]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/fib_frontend.c
[NET]: Make device event notification network namespace safe
[linux-2.6-omap-h63xx.git] / net / ipv4 / fib_frontend.c
index eff6bce453eed8c178f70863a934dc5207c2c17b..cefb55ec3d627166a02efee2181ae75aec998b90 100644 (file)
@@ -860,6 +860,9 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
        struct net_device *dev = ptr;
        struct in_device *in_dev = __in_dev_get_rtnl(dev);
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        if (event == NETDEV_UNREGISTER) {
                fib_disable_ip(dev, 2);
                return NOTIFY_DONE;