]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/bonding/bond_main.c
[NET]: Make device event notification network namespace safe
[net-next-2.6.git] / drivers / net / bonding / bond_main.c
index e4e5fdc0430b78514794469ff7c63a46988f33cb..cf97d8a6326e21544ebe5d04b186b273fc9335ee 100644 (file)
@@ -3299,6 +3299,9 @@ static int bond_netdev_event(struct notifier_block *this, unsigned long event, v
 {
        struct net_device *event_dev = (struct net_device *)ptr;
 
+       if (event_dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        dprintk("event_dev: %s, event: %lx\n",
                (event_dev ? event_dev->name : "None"),
                event);