]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/xfrm/xfrm_policy.c
[NET]: Make device event notification network namespace safe
[linux-2.6-omap-h63xx.git] / net / xfrm / xfrm_policy.c
index 36dd31c40f4ab7b0efb69a8a83a0bbe1fa22bbfd..50682d3cd7a97c9bd66d6f5125d5f59cadd3179e 100644 (file)
@@ -2236,6 +2236,11 @@ static void xfrm_policy_unlock_afinfo(struct xfrm_policy_afinfo *afinfo)
 
 static int xfrm_dev_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
+       struct net_device *dev = ptr;
+
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        switch (event) {
        case NETDEV_DOWN:
                xfrm_flush_bundles();