]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/8021q/vlan.c
[NET]: Make device event notification network namespace safe
[linux-2.6-omap-h63xx.git] / net / 8021q / vlan.c
index 2a546919d6fbd72e10ea6c01dc908e84eb012aa4..d0d36fdedbe988123e5458c5271351b98ba55498 100644 (file)
@@ -31,6 +31,7 @@
 #include <net/arp.h>
 #include <linux/rtnetlink.h>
 #include <linux/notifier.h>
+#include <net/net_namespace.h>
 
 #include <linux/if_vlan.h>
 #include "vlan.h"
@@ -603,6 +604,9 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
        int i, flgs;
        struct net_device *vlandev;
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        if (!grp)
                goto out;