Skip to content

Commit 1ac89d2

Browse files
Florian Westphalummakynes
authored andcommitted
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 <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 0168e8b commit 1ac89d2

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

net/netfilter/Kconfig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,7 @@ config NF_NAT_TFTP
433433
default NF_NAT && NF_CONNTRACK_TFTP
434434

435435
config NF_NAT_REDIRECT
436-
tristate "IPv4/IPv6 redirect support"
437-
depends on NF_NAT
438-
help
439-
This is the kernel functionality to redirect packets to local
440-
machine through NAT.
436+
bool
441437

442438
config NETFILTER_SYNPROXY
443439
tristate

net/netfilter/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ obj-$(CONFIG_NF_LOG_COMMON) += nf_log_common.o
5555
obj-$(CONFIG_NF_LOG_NETDEV) += nf_log_netdev.o
5656

5757
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
5959

6060
# NAT helpers
6161
obj-$(CONFIG_NF_NAT_AMANDA) += nf_nat_amanda.o

net/netfilter/nf_nat_redirect.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <linux/inetdevice.h>
1616
#include <linux/ip.h>
1717
#include <linux/kernel.h>
18-
#include <linux/module.h>
1918
#include <linux/netdevice.h>
2019
#include <linux/netfilter.h>
2120
#include <linux/types.h>
@@ -124,6 +123,3 @@ nf_nat_redirect_ipv6(struct sk_buff *skb, const struct nf_nat_range2 *range,
124123
return nf_nat_setup_info(ct, &newrange, NF_NAT_MANIP_DST);
125124
}
126125
EXPORT_SYMBOL_GPL(nf_nat_redirect_ipv6);
127-
128-
MODULE_LICENSE("GPL");
129-
MODULE_AUTHOR("Patrick McHardy <[email protected]>");

0 commit comments

Comments
 (0)