]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv4/arp.c
[NET]: Make device event notification network namespace safe
[net-next-2.6.git] / net / ipv4 / arp.c
index bde129708e2282e310d10e56157a77e389a4a5ea..a11e7a5c1da4312ccebb28adf4e4f4cf93532394 100644 (file)
@@ -1205,6 +1205,9 @@ static int arp_netdev_event(struct notifier_block *this, unsigned long event, vo
 {
        struct net_device *dev = ptr;
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        switch (event) {
        case NETDEV_CHANGEADDR:
                neigh_changeaddr(&arp_tbl, dev);