netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf] netfilter: nf_conntrack: silent warning when adding extensions to templates
@ 2015-07-20  8:49 Pablo Neira Ayuso
  2015-07-22 19:55 ` heads up, rebasing nf (was Re: [PATCH nf] netfilter: nf_conntrack: silent warning when adding) " Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira Ayuso @ 2015-07-20  8:49 UTC (permalink / raw)
  To: netfilter-devel

[   12.602995] ------------[ cut here ]------------
[   12.604390] WARNING: CPU: 0 PID: 1 at net/netfilter/nf_conntrack_extend.c:80 __nf_ct_ext_add_length+0x2a/0x230()

Templates need to be unconfirmed when adding extensions to avoid this warning.

Fixes: 579502f10880 ("netfilter: fix netns dependencies with conntrack templates")
Reported-by: kernel test robot <ying.huang@intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/netfilter/nf_conntrack_core.c |    2 +-
 net/netfilter/nf_synproxy_core.c  |    1 +
 net/netfilter/xt_CT.c             |    1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 3d12eb7..651039a 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -296,7 +296,7 @@ struct nf_conn *nf_ct_tmpl_alloc(struct net *net, u16 zone, gfp_t flags)
 	if (tmpl == NULL)
 		return NULL;
 
-	tmpl->status = IPS_TEMPLATE | IPS_CONFIRMED;
+	tmpl->status = IPS_TEMPLATE;
 	write_pnet(&tmpl->ct_net, net);
 
 #ifdef CONFIG_NF_CONNTRACK_ZONES
diff --git a/net/netfilter/nf_synproxy_core.c b/net/netfilter/nf_synproxy_core.c
index 5fb14b9..71f1e9f 100644
--- a/net/netfilter/nf_synproxy_core.c
+++ b/net/netfilter/nf_synproxy_core.c
@@ -363,6 +363,7 @@ static int __net_init synproxy_net_init(struct net *net)
 	if (!nfct_synproxy_ext_add(ct))
 		goto err2;
 
+	__set_bit(IPS_CONFIRMED_BIT, &ct->status);
 	nf_conntrack_get(&ct->ct_general);
 	snet->tmpl = ct;
 
diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c
index 20b9cb0..c663003 100644
--- a/net/netfilter/xt_CT.c
+++ b/net/netfilter/xt_CT.c
@@ -225,6 +225,7 @@ static int xt_ct_tg_check(const struct xt_tgchk_param *par,
 		if (ret < 0)
 			goto err3;
 	}
+	__set_bit(IPS_CONFIRMED_BIT, &ct->status);
 	nf_conntrack_get(&ct->ct_general);
 out:
 	info->ct = ct;
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* heads up, rebasing nf (was Re: [PATCH nf] netfilter: nf_conntrack: silent warning when adding) extensions to templates
  2015-07-20  8:49 [PATCH nf] netfilter: nf_conntrack: silent warning when adding extensions to templates Pablo Neira Ayuso
@ 2015-07-22 19:55 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2015-07-22 19:55 UTC (permalink / raw)
  To: netfilter-devel

On Mon, Jul 20, 2015 at 10:49:57AM +0200, Pablo Neira Ayuso wrote:
> [   12.602995] ------------[ cut here ]------------
> [   12.604390] WARNING: CPU: 0 PID: 1 at net/netfilter/nf_conntrack_extend.c:80 __nf_ct_ext_add_length+0x2a/0x230()
> 
> Templates need to be unconfirmed when adding extensions to avoid this warning.
> 
> Fixes: 579502f10880 ("netfilter: fix netns dependencies with conntrack templates")
> Reported-by: kernel test robot <ying.huang@intel.com>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

JFYI: I'm going to collapse this patch to 579502f10880 so it becomes
easier to pass this one to -stable without major dependencies.

So I'm rebasing the nf tree here, sorry for the inconvenience.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-22 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-20  8:49 [PATCH nf] netfilter: nf_conntrack: silent warning when adding extensions to templates Pablo Neira Ayuso
2015-07-22 19:55 ` heads up, rebasing nf (was Re: [PATCH nf] netfilter: nf_conntrack: silent warning when adding) " Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).