]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/netfilter/nfnetlink_queue.c
[IPV4]: Add ICMPMsgStats MIB (RFC 4293)
[karo-tx-linux.git] / net / netfilter / nfnetlink_queue.c
index 7d47fc4b19c67dab1be3b5d6302ec579e301bc67..c97369f48db7844482cd15eaa648e297166139a7 100644 (file)
@@ -734,6 +734,9 @@ nfqnl_rcv_dev_event(struct notifier_block *this,
 {
        struct net_device *dev = ptr;
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        /* Drop any packets associated with the downed device */
        if (event == NETDEV_DOWN)
                nfqnl_dev_drop(dev->ifindex);
@@ -762,7 +765,8 @@ nfqnl_rcv_nl_event(struct notifier_block *this,
                        struct hlist_head *head = &instance_table[i];
 
                        hlist_for_each_entry_safe(inst, tmp, t2, head, hlist) {
-                               if (n->pid == inst->peer_pid)
+                               if ((n->net == &init_net) &&
+                                   (n->pid == inst->peer_pid))
                                        __instance_destroy(inst);
                        }
                }
@@ -1048,7 +1052,7 @@ static int seq_show(struct seq_file *s, void *v)
                          atomic_read(&inst->use));
 }
 
-static struct seq_operations nfqnl_seq_ops = {
+static const struct seq_operations nfqnl_seq_ops = {
        .start  = seq_start,
        .next   = seq_next,
        .stop   = seq_stop,