netfilter: use macros to create module aliases.

Each NAT helper creates a module alias which follows a pattern.
Use macros for consistency.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Flavio Leitner 2019-04-17 11:46:14 -03:00 committed by Pablo Neira Ayuso
parent 8f14c99c7e
commit e1f172e162
8 changed files with 11 additions and 7 deletions

View File

@ -15,6 +15,10 @@
#include <net/netfilter/nf_conntrack_extend.h>
#include <net/netfilter/nf_conntrack_expect.h>
#define NF_NAT_HELPER_NAME(name) "ip_nat_" name
#define MODULE_ALIAS_NF_NAT_HELPER(name) \
MODULE_ALIAS(NF_NAT_HELPER_NAME(name))
struct module;
enum nf_ct_helper_flags {

View File

@ -631,4 +631,4 @@ module_exit(fini);
MODULE_AUTHOR("Jing Min Zhao <zhaojingmin@users.sourceforge.net>");
MODULE_DESCRIPTION("H.323 NAT helper");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ip_nat_h323");
MODULE_ALIAS_NF_NAT_HELPER("h323");

View File

@ -37,7 +37,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
MODULE_DESCRIPTION("Netfilter NAT helper module for PPTP");
MODULE_ALIAS("ip_nat_pptp");
MODULE_ALIAS_NF_NAT_HELPER("pptp");
static void pptp_nat_expected(struct nf_conn *ct,
struct nf_conntrack_expect *exp)

View File

@ -22,7 +22,7 @@
MODULE_AUTHOR("Brian J. Murrell <netfilter@interlinx.bc.ca>");
MODULE_DESCRIPTION("Amanda NAT helper");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ip_nat_amanda");
MODULE_ALIAS_NF_NAT_HELPER("amanda");
static unsigned int help(struct sk_buff *skb,
enum ip_conntrack_info ctinfo,

View File

@ -24,7 +24,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Rusty Russell <rusty@rustcorp.com.au>");
MODULE_DESCRIPTION("ftp NAT helper");
MODULE_ALIAS("ip_nat_ftp");
MODULE_ALIAS_NF_NAT_HELPER("ftp");
/* FIXME: Time out? --RR */

View File

@ -26,7 +26,7 @@
MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
MODULE_DESCRIPTION("IRC (DCC) NAT helper");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ip_nat_irc");
MODULE_ALIAS_NF_NAT_HELPER("irc");
static unsigned int help(struct sk_buff *skb,
enum ip_conntrack_info ctinfo,

View File

@ -27,7 +27,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Christian Hentschel <chentschel@arnet.com.ar>");
MODULE_DESCRIPTION("SIP NAT helper");
MODULE_ALIAS("ip_nat_sip");
MODULE_ALIAS_NF_NAT_HELPER("sip");
static unsigned int mangle_packet(struct sk_buff *skb, unsigned int protoff,

View File

@ -16,7 +16,7 @@
MODULE_AUTHOR("Magnus Boden <mb@ozaba.mine.nu>");
MODULE_DESCRIPTION("TFTP NAT helper");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ip_nat_tftp");
MODULE_ALIAS_NF_NAT_HELPER("tftp");
static unsigned int help(struct sk_buff *skb,
enum ip_conntrack_info ctinfo,