diff mbox

netfilter -stable 02/04: nf_conntrack: netns fix re reliable conntrack event delivery

Message ID 20090917115825.12728.69202.sendpatchset@x2.localnet
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Patrick McHardy Sept. 17, 2009, 11:58 a.m. UTC
commit 352a76c896217cfa1d61a49e5b2e3f1e9760943f
Author: Patrick McHardy <kaber@trash.net>
Date:   Thu Sep 17 13:28:48 2009 +0200

    netfilter: nf_conntrack: netns fix re reliable conntrack event delivery
    Upstream commit ee254fa4:
    Conntracks in netns other than init_net dying list were never killed.
    Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
    Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Patrick McHardy <kaber@trash.net>

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox


diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index b5869b9..b8614c6 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1089,14 +1089,14 @@  void nf_conntrack_flush_report(struct net *net, u32 pid, int report)
-static void nf_ct_release_dying_list(void)
+static void nf_ct_release_dying_list(struct net *net)
 	struct nf_conntrack_tuple_hash *h;
 	struct nf_conn *ct;
 	struct hlist_nulls_node *n;
-	hlist_nulls_for_each_entry(h, n, &init_net.ct.dying, hnnode) {
+	hlist_nulls_for_each_entry(h, n, &net->ct.dying, hnnode) {
 		ct = nf_ct_tuplehash_to_ctrack(h);
 		/* never fails to remove them, no listeners at this point */
@@ -1115,7 +1115,7 @@  static void nf_conntrack_cleanup_net(struct net *net)
 	nf_ct_iterate_cleanup(net, kill_all, NULL);
-	nf_ct_release_dying_list();
+	nf_ct_release_dying_list(net);
 	if (atomic_read(&net->ct.count) != 0) {
 		goto i_see_dead_people;