lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 11 Apr 2019 15:33:42 -0300
From:   Flavio Leitner <fbl@...close.org>
To:     Pablo Neira Ayuso <pablo@...filter.org>
Cc:     netdev@...r.kernel.org, Joe Stringer <joe@....org>,
        Pravin B Shelar <pshelar@....org>, dev@...nvswitch.org,
        netfilter-devel@...r.kernel.org
Subject: Re: [PATCH net-next 1/8] netfilter: use macros to create module
 aliases.

On Mon, Apr 01, 2019 at 12:07:43AM +0200, Pablo Neira Ayuso wrote:
> On Tue, Mar 26, 2019 at 05:57:08PM -0300, Flavio Leitner wrote:
> > Each NAT helper creates a module alias which follows a pattern.
> > Use macros for consistency.
> > 
> > Signed-off-by: Flavio Leitner <fbl@...close.org>
> > ---
> >  include/net/netfilter/nf_conntrack_helper.h | 4 ++++
> >  net/ipv4/netfilter/nf_nat_h323.c            | 2 +-
> >  net/ipv4/netfilter/nf_nat_pptp.c            | 2 +-
> >  net/netfilter/nf_nat_amanda.c               | 2 +-
> >  net/netfilter/nf_nat_ftp.c                  | 2 +-
> >  net/netfilter/nf_nat_irc.c                  | 2 +-
> >  net/netfilter/nf_nat_sip.c                  | 2 +-
> >  net/netfilter/nf_nat_tftp.c                 | 2 +-
> >  8 files changed, 11 insertions(+), 7 deletions(-)
> > 
> > diff --git a/include/net/netfilter/nf_conntrack_helper.h b/include/net/netfilter/nf_conntrack_helper.h
> > index ec52a8dc32fd..e86fadf7e7c5 100644
> > --- a/include/net/netfilter/nf_conntrack_helper.h
> > +++ b/include/net/netfilter/nf_conntrack_helper.h
> > @@ -15,6 +15,10 @@
> >  #include <net/netfilter/nf_conntrack_extend.h>
> >  #include <net/netfilter/nf_conntrack_expect.h>
> >  
> > +#define NF_CT_NAT_HELPER_MOD_NAME(name)	"ip_nat_" name
> 
> I'd suggest a rename from NF_CT_NAT_HELPER_MOD_NAME() to
> NF_NAT_HELPER_NAME().

OK.


> Please, also use "nf_nat_" prefix instead, "ip_nat" is legacy stuff.

I don't think we can, because people might be using
the current alias which is ip_nat_something. This patch
is just making it more robust.

> > +#define MODULE_ALIAS_NFCT_HELPER_NAT(name) \
> > +	MODULE_ALIAS(NF_CT_NAT_HELPER_MOD_NAME(name))
> 
> Probably:
> 
>         MODULE_ALIAS_NF_NAT_HELPER
> 
> instead of MODULE_ALIAS_NFCT_HELPER_NAT.

OK.

fbl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ