]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/x25/af_x25.c
[NET]: Make device event notification network namespace safe
[net-next-2.6.git] / net / x25 / af_x25.c
index 2e9931571a4d29f092e07725465ec3a28563981e..fc416f9606a9e259e22f2e641c602107e06b9200 100644 (file)
@@ -191,6 +191,9 @@ static int x25_device_event(struct notifier_block *this, unsigned long event,
        struct net_device *dev = ptr;
        struct x25_neigh *nb;
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        if (dev->type == ARPHRD_X25
 #if defined(CONFIG_LLC) || defined(CONFIG_LLC_MODULE)
         || dev->type == ARPHRD_ETHER