diff options
author | Florian Westphal <fw@strlen.de> | 2018-05-24 07:17:29 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-05-28 18:25:40 -0400 |
commit | 1ac89d20150e377b74d2ef23f56db0f08088426c (patch) | |
tree | 669e255fcafb9bcd6e3743f4a491727b07aaec9a | |
parent | 0168e8b36145a7db353055bdd2673096165c8a3a (diff) |
netfilter: nat: merge nf_nat_redirect into nf_nat
Similar to previous patch, this time, merge redirect+nat.
The redirect module is just 2k in size, get rid of it and make
redirect part available from the nat core.
before:
text data bss dec hex filename
19461 1484 4138 25083 61fb net/netfilter/nf_nat.ko
1236 792 0 2028 7ec net/netfilter/nf_nat_redirect.ko
after:
20340 1508 4138 25986 6582 net/netfilter/nf_nat.ko
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | net/netfilter/Kconfig | 6 | ||||
-rw-r--r-- | net/netfilter/Makefile | 2 | ||||
-rw-r--r-- | net/netfilter/nf_nat_redirect.c | 4 |
3 files changed, 2 insertions, 10 deletions
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index a5b60e6a983e..3ec8886850b2 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig | |||
@@ -433,11 +433,7 @@ config NF_NAT_TFTP | |||
433 | default NF_NAT && NF_CONNTRACK_TFTP | 433 | default NF_NAT && NF_CONNTRACK_TFTP |
434 | 434 | ||
435 | config NF_NAT_REDIRECT | 435 | config NF_NAT_REDIRECT |
436 | tristate "IPv4/IPv6 redirect support" | 436 | bool |
437 | depends on NF_NAT | ||
438 | help | ||
439 | This is the kernel functionality to redirect packets to local | ||
440 | machine through NAT. | ||
441 | 437 | ||
442 | config NETFILTER_SYNPROXY | 438 | config NETFILTER_SYNPROXY |
443 | tristate | 439 | tristate |
diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile index 1aa710b5d384..9b3434360d49 100644 --- a/net/netfilter/Makefile +++ b/net/netfilter/Makefile | |||
@@ -55,7 +55,7 @@ obj-$(CONFIG_NF_LOG_COMMON) += nf_log_common.o | |||
55 | obj-$(CONFIG_NF_LOG_NETDEV) += nf_log_netdev.o | 55 | obj-$(CONFIG_NF_LOG_NETDEV) += nf_log_netdev.o |
56 | 56 | ||
57 | obj-$(CONFIG_NF_NAT) += nf_nat.o | 57 | obj-$(CONFIG_NF_NAT) += nf_nat.o |
58 | obj-$(CONFIG_NF_NAT_REDIRECT) += nf_nat_redirect.o | 58 | nf_nat-$(CONFIG_NF_NAT_REDIRECT) += nf_nat_redirect.o |
59 | 59 | ||
60 | # NAT helpers | 60 | # NAT helpers |
61 | obj-$(CONFIG_NF_NAT_AMANDA) += nf_nat_amanda.o | 61 | obj-$(CONFIG_NF_NAT_AMANDA) += nf_nat_amanda.o |
diff --git a/net/netfilter/nf_nat_redirect.c b/net/netfilter/nf_nat_redirect.c index 7c4bb0a773ca..adee04af8d43 100644 --- a/net/netfilter/nf_nat_redirect.c +++ b/net/netfilter/nf_nat_redirect.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/inetdevice.h> | 15 | #include <linux/inetdevice.h> |
16 | #include <linux/ip.h> | 16 | #include <linux/ip.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | ||
19 | #include <linux/netdevice.h> | 18 | #include <linux/netdevice.h> |
20 | #include <linux/netfilter.h> | 19 | #include <linux/netfilter.h> |
21 | #include <linux/types.h> | 20 | #include <linux/types.h> |
@@ -124,6 +123,3 @@ nf_nat_redirect_ipv6(struct sk_buff *skb, const struct nf_nat_range2 *range, | |||
124 | return nf_nat_setup_info(ct, &newrange, NF_NAT_MANIP_DST); | 123 | return nf_nat_setup_info(ct, &newrange, NF_NAT_MANIP_DST); |
125 | } | 124 | } |
126 | EXPORT_SYMBOL_GPL(nf_nat_redirect_ipv6); | 125 | EXPORT_SYMBOL_GPL(nf_nat_redirect_ipv6); |
127 | |||
128 | MODULE_LICENSE("GPL"); | ||
129 | MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>"); | ||