aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/devinet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index e10794dc5f64..98a00d0edc76 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -502,8 +502,10 @@ static struct in_ifaddr *rtm_to_ifaddr(struct nlmsghdr *nlh)
502 goto errout; 502 goto errout;
503 503
504 ifm = nlmsg_data(nlh); 504 ifm = nlmsg_data(nlh);
505 if (ifm->ifa_prefixlen > 32 || tb[IFA_LOCAL] == NULL) 505 if (ifm->ifa_prefixlen > 32 || tb[IFA_LOCAL] == NULL) {
506 err = -EINVAL;
506 goto errout; 507 goto errout;
508 }
507 509
508 dev = __dev_get_by_index(ifm->ifa_index); 510 dev = __dev_get_by_index(ifm->ifa_index);
509 if (dev == NULL) { 511 if (dev == NULL) {