Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1571920

Re: [PATCH v2] netfilter: nf_ct_helper: warn when not applying default helper assignment

From Jiri Kosina <jikos@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] netfilter: nf_ct_helper: warn when not applying default helper assignment
Date 2017-02-01 20:50 +0100
Message-ID <t694K-1Kd-9@gated-at.bofh.it> (permalink)
References (3 earlier) <t34bh-1t2-51@gated-at.bofh.it> <t36mJ-30U-5@gated-at.bofh.it> <t3BgS-5NU-5@gated-at.bofh.it> <t3CFY-6Do-5@gated-at.bofh.it> <t65Xc-8e7-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 1 Feb 2017, Pablo Neira Ayuso wrote:

> > +{
> > +	struct nf_conntrack_helper *ret;
> > +
> > +	if (!net->ct.sysctl_auto_assign_helper) {
> > +		if (net->ct.auto_assign_helper_warned)
> > +			return NULL;
> > +		if (!find_auto_helper(ct))
> 
> This fits in one line, so I think no need for find_auto_helper(), look:

It does, but OTOH we're calling the lookup more than once, and that for me 
justifies extra function (with a descriptive name), so that we don't have 
to change multiple places in case the data structure changes in the 
future.

But I don't have a strong preference either way, so I'll change it.

> > +	if (!ret || net->ct.auto_assign_helper_warned)
> > +		return ret;
> > +	pr_info("nf_conntrack: automatic helper assignment is deprecated and it will "
> > +		"be removed soon. Use the iptables CT target to attach helpers "
> > +		" instead.\n");
> 
> You can probably remove this older message now if you prefer the new
> one you wrote, actually it's a bit redundant IMO.

Fair enough; we'll be issuing the warning in cases where actual "harm" 
would be caused, and that should be enough.

I'll trim down the CC list a little bit and submit v3 shortly.

Thanks,

-- 
Jiri Kosina
SUSE Labs

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2] netfilter: nf_ct_helper: warn when not applying  default helper assignment Pablo Neira Ayuso <pablo@netfilter.org> - 2017-02-01 17:30 +0100
  Re: [PATCH v2] netfilter: nf_ct_helper: warn when not applying  default helper assignment Jiri Kosina <jikos@kernel.org> - 2017-02-01 20:50 +0100
    [PATCH v3] netfilter: nf_ct_helper: warn when not applying default  helper assignment Jiri Kosina <jikos@kernel.org> - 2017-02-01 21:10 +0100
      Re: [PATCH v3] netfilter: nf_ct_helper: warn when not applying  default helper assignment Pablo Neira Ayuso <pablo@netfilter.org> - 2017-02-02 14:30 +0100

csiph-web