]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/packet/af_packet.c
[NET]: Make device event notification network namespace safe
[linux-2.6-omap-h63xx.git] / net / packet / af_packet.c
index cae1ee4f2ad68a7f1d13552dd97c5787fc71479c..ad0052524e88574f33bbf6f537cfe4cc584f5215 100644 (file)
@@ -1477,6 +1477,9 @@ static int packet_notifier(struct notifier_block *this, unsigned long msg, void
        struct hlist_node *node;
        struct net_device *dev = data;
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        read_lock(&packet_sklist_lock);
        sk_for_each(sk, node, &packet_sklist) {
                struct packet_sock *po = pkt_sk(sk);