]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/bonding/bond_3ad.c
[NET]: Make packet reception network namespace safe
[linux-2.6-omap-h63xx.git] / drivers / net / bonding / bond_3ad.c
index f829e4ad8b4970aacd1cc893e0c65a7855f751bd..94bd739414517a0d35f98ee31c80c9175043ee9d 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/ethtool.h>
 #include <linux/if_bonding.h>
 #include <linux/pkt_sched.h>
+#include <net/net_namespace.h>
 #include "bonding.h"
 #include "bond_3ad.h"
 
@@ -2448,6 +2449,9 @@ int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct pac
        struct slave *slave = NULL;
        int ret = NET_RX_DROP;
 
+       if (dev->nd_net != &init_net)
+               goto out;
+
        if (!(dev->flags & IFF_MASTER))
                goto out;