Patchwork netfilter: fix incorrect logic in nf_conntrack_init_net

login
register
mail settings
Submitter Gao feng
Date April 8, 2012, 2:08 a.m.
Message ID <1333850908-3108-1-git-send-email-gaofeng@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/151335/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Gao feng - April 8, 2012, 2:08 a.m.
in function nf_conntrack_init_net,when nf_conntrack_timeout_init falied,
we should call nf_conntrack_ecache_fini to do rollback.
but the current code calls nf_conntrack_timeout_fini.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
---
 net/netfilter/nf_conntrack_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Pablo Neira - April 10, 2012, 12:36 p.m.
On Sun, Apr 08, 2012 at 10:08:28AM +0800, Gao feng wrote:
> in function nf_conntrack_init_net,when nf_conntrack_timeout_init falied,
> we should call nf_conntrack_ecache_fini to do rollback.
> but the current code calls nf_conntrack_timeout_fini.
> 
> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>

Applied, thanks.
--
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

Patch

diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 3cc4487..729f157 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1592,7 +1592,7 @@  static int nf_conntrack_init_net(struct net *net)
 	return 0;
 
 err_timeout:
-	nf_conntrack_timeout_fini(net);
+	nf_conntrack_ecache_fini(net);
 err_ecache:
 	nf_conntrack_tstamp_fini(net);
 err_tstamp: