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:   Mon, 1 Apr 2019 00:07:43 +0200
From:   Pablo Neira Ayuso <pablo@...filter.org>
To:     Flavio Leitner <fbl@...close.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 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().

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

> +#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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ