diff options
| -rw-r--r-- | net/ipv4/fib_frontend.c | 5 | ||||
| -rw-r--r-- | net/ipv4/fib_semantics.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 1fba6439fc57..fc920f63452b 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
| @@ -493,6 +493,11 @@ static int rtm_to_fib_config(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
| 493 | cfg->fc_nlinfo.pid = NETLINK_CB(skb).pid; | 493 | cfg->fc_nlinfo.pid = NETLINK_CB(skb).pid; |
| 494 | cfg->fc_nlinfo.nlh = nlh; | 494 | cfg->fc_nlinfo.nlh = nlh; |
| 495 | 495 | ||
| 496 | if (cfg->fc_type > RTN_MAX) { | ||
| 497 | err = -EINVAL; | ||
| 498 | goto errout; | ||
| 499 | } | ||
| 500 | |||
| 496 | nlmsg_for_each_attr(attr, nlh, sizeof(struct rtmsg), remaining) { | 501 | nlmsg_for_each_attr(attr, nlh, sizeof(struct rtmsg), remaining) { |
| 497 | switch (attr->nla_type) { | 502 | switch (attr->nla_type) { |
| 498 | case RTA_DST: | 503 | case RTA_DST: |
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 2f1fdae6efa6..3dad12ee76c3 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c | |||
| @@ -89,7 +89,7 @@ static const struct | |||
| 89 | { | 89 | { |
| 90 | int error; | 90 | int error; |
| 91 | u8 scope; | 91 | u8 scope; |
| 92 | } fib_props[RTA_MAX + 1] = { | 92 | } fib_props[RTN_MAX + 1] = { |
| 93 | { | 93 | { |
| 94 | .error = 0, | 94 | .error = 0, |
| 95 | .scope = RT_SCOPE_NOWHERE, | 95 | .scope = RT_SCOPE_NOWHERE, |
