lkml.org 
[lkml]   [2017]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] netfilter: nf_ct_helper: warn when not applying default helper assignment
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

\
 
 \ /
  Last update: 2017-02-01 20:44    [W:0.075 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site