]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/core/fib_rules.c
[NET]: Make device event notification network namespace safe
[linux-2.6-omap-h63xx.git] / net / core / fib_rules.c
index 8c5474e16683aa22971b1bed0390354b728a0f64..9eabe1ae01dc3ca147487558ce322ef4dc028129 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
+#include <net/net_namespace.h>
 #include <net/fib_rules.h>
 
 static LIST_HEAD(rules_ops);
@@ -596,6 +597,9 @@ static int fib_rules_event(struct notifier_block *this, unsigned long event,
        struct net_device *dev = ptr;
        struct fib_rules_ops *ops;
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        ASSERT_RTNL();
        rcu_read_lock();