netfilter: nf_conntrack: silent warning when adding extensions to templates
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH 1/1 netfilter: nf_conntrack: silent warning when adding extensions to templates
[ 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 <[email protected]>
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- 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(-)
net/netfilter/nf_conntrack_core.c +1 -1
@@ -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
net/netfilter/nf_synproxy_core.c +1 -0
@@ -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;
net/netfilter/xt_CT.c +1 -0
@@ -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;
Signature · 1 line
1.7.10.4
Pablo Neira Ayuso
maintainerheads up, rebasing nf (was Re: [PATCH nf] netfilter: nf_conntrack: silent warning when adding) extensions to templates
Quoted 8 lines · Pablo Neira Ayuso
[ 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 <[email protected]>Signed-off-by Pablo Neira Ayuso <[email protected]>
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.