]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/bridge/br_stp_bpdu.c
[NET]: Make packet reception network namespace safe
[mv-sheeva.git] / net / bridge / br_stp_bpdu.c
index 14f0c888eecc4f87cb46fe2dd4a379bb501fbc25..0edbd2a1c3f3cafe6d2046360f92b5a9084235f3 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/netfilter_bridge.h>
 #include <linux/etherdevice.h>
 #include <linux/llc.h>
+#include <net/net_namespace.h>
 #include <net/llc.h>
 #include <net/llc_pdu.h>
 #include <asm/unaligned.h>
@@ -141,6 +142,9 @@ int br_stp_rcv(struct sk_buff *skb, struct net_device *dev,
        struct net_bridge *br;
        const unsigned char *buf;
 
+       if (dev->nd_net != &init_net)
+               goto err;
+
        if (!p)
                goto err;