]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/block/aoe/aoenet.c
[NET]: Make packet reception network namespace safe
[mirror_ubuntu-zesty-kernel.git] / drivers / block / aoe / aoenet.c
index f9ddfda4d9cb5945e3800e4a6865691e6069765f..4dc0fb7da94b50dacbdb0084dc7f7f037f0db435 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/blkdev.h>
 #include <linux/netdevice.h>
 #include <linux/moduleparam.h>
+#include <net/net_namespace.h>
 #include <asm/unaligned.h>
 #include "aoe.h"
 
@@ -114,6 +115,9 @@ aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
        struct aoe_hdr *h;
        u32 n;
 
+       if (ifp->nd_net != &init_net)
+               goto exit;
+
        skb = skb_share_check(skb, GFP_ATOMIC);
        if (skb == NULL)
                return 0;