|
@@ -493,6 +493,11 @@ static int rtm_to_fib_config(struct sk_buff *skb, struct nlmsghdr *nlh,
|
|
|
cfg->fc_nlinfo.pid = NETLINK_CB(skb).pid;
|
|
|
cfg->fc_nlinfo.nlh = nlh;
|
|
|
|
|
|
+ if (cfg->fc_type > RTN_MAX) {
|
|
|
+ err = -EINVAL;
|
|
|
+ goto errout;
|
|
|
+ }
|
|
|
+
|
|
|
nlmsg_for_each_attr(attr, nlh, sizeof(struct rtmsg), remaining) {
|
|
|
switch (attr->nla_type) {
|
|
|
case RTA_DST:
|