aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/arp.c1
-rw-r--r--net/ipv4/devinet.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 6f0827b2b154..b2c19cb12063 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -402,7 +402,6 @@ static int arp_ignore(struct in_device *in_dev, __be32 sip, __be32 tip)
402 case 3: /* Do not reply for scope host addresses */ 402 case 3: /* Do not reply for scope host addresses */
403 sip = 0; 403 sip = 0;
404 scope = RT_SCOPE_LINK; 404 scope = RT_SCOPE_LINK;
405 in_dev = NULL;
406 break; 405 break;
407 case 4: /* Reserved */ 406 case 4: /* Reserved */
408 case 5: 407 case 5:
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index dc1665a2b075..e381edb19b23 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -978,13 +978,15 @@ __be32 inet_confirm_addr(struct in_device *in_dev,
978{ 978{
979 __be32 addr = 0; 979 __be32 addr = 0;
980 struct net_device *dev; 980 struct net_device *dev;
981 struct net *net;
981 982
982 if (in_dev != NULL) 983 if (scope != RT_SCOPE_LINK)
983 return confirm_addr_indev(in_dev, dst, local, scope); 984 return confirm_addr_indev(in_dev, dst, local, scope);
984 985
986 net = in_dev->dev->nd_net;
985 read_lock(&dev_base_lock); 987 read_lock(&dev_base_lock);
986 rcu_read_lock(); 988 rcu_read_lock();
987 for_each_netdev(&init_net, dev) { 989 for_each_netdev(net, dev) {
988 if ((in_dev = __in_dev_get_rcu(dev))) { 990 if ((in_dev = __in_dev_get_rcu(dev))) {
989 addr = confirm_addr_indev(in_dev, dst, local, scope); 991 addr = confirm_addr_indev(in_dev, dst, local, scope);
990 if (addr) 992 if (addr)