Skip to content

Commit c78efc9

Browse files
Florian Westphalummakynes
authored andcommitted
netfilter: nf_tables: nat: merge nft_redir protocol specific modules
before: text data bss dec hex filename 990 832 0 1822 71e nft_redir.ko 697 896 0 1593 639 nft_redir_ipv4.ko 713 896 0 1609 649 nft_redir_ipv6.ko after: text data bss dec hex filename 1910 960 0 2870 b36 nft_redir.ko size is reduced, all helpers from nft_redir.ko can be made static. Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 20fdaf6 commit c78efc9

File tree

9 files changed

+143
-217
lines changed

9 files changed

+143
-217
lines changed

include/net/netfilter/nft_redir.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

net/ipv4/netfilter/Kconfig

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,6 @@ config NFT_MASQ_IPV4
115115
This is the expression that provides IPv4 masquerading support for
116116
nf_tables.
117117

118-
config NFT_REDIR_IPV4
119-
tristate "IPv4 redirect support for nf_tables"
120-
depends on NF_TABLES_IPV4
121-
depends on NFT_REDIR
122-
select NF_NAT_REDIRECT
123-
help
124-
This is the expression that provides IPv4 redirect support for
125-
nf_tables.
126118
endif # NF_TABLES
127119

128120
config NF_NAT_SNMP_BASIC

net/ipv4/netfilter/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ obj-$(CONFIG_NFT_CHAIN_NAT_IPV4) += nft_chain_nat_ipv4.o
2929
obj-$(CONFIG_NFT_REJECT_IPV4) += nft_reject_ipv4.o
3030
obj-$(CONFIG_NFT_FIB_IPV4) += nft_fib_ipv4.o
3131
obj-$(CONFIG_NFT_MASQ_IPV4) += nft_masq_ipv4.o
32-
obj-$(CONFIG_NFT_REDIR_IPV4) += nft_redir_ipv4.o
3332
obj-$(CONFIG_NFT_DUP_IPV4) += nft_dup_ipv4.o
3433

3534
# flow table support

net/ipv4/netfilter/nft_redir_ipv4.c

Lines changed: 0 additions & 82 deletions
This file was deleted.

net/ipv6/netfilter/Kconfig

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ config NFT_MASQ_IPV6
4949
This is the expression that provides IPv4 masquerading support for
5050
nf_tables.
5151

52-
config NFT_REDIR_IPV6
53-
tristate "IPv6 redirect support for nf_tables"
54-
depends on NFT_REDIR
55-
select NF_NAT_REDIRECT
56-
help
57-
This is the expression that provides IPv4 redirect support for
58-
nf_tables.
59-
6052
endif # NF_NAT
6153

6254
config NFT_REJECT_IPV6

net/ipv6/netfilter/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ obj-$(CONFIG_NFT_CHAIN_ROUTE_IPV6) += nft_chain_route_ipv6.o
3131
obj-$(CONFIG_NFT_CHAIN_NAT_IPV6) += nft_chain_nat_ipv6.o
3232
obj-$(CONFIG_NFT_REJECT_IPV6) += nft_reject_ipv6.o
3333
obj-$(CONFIG_NFT_MASQ_IPV6) += nft_masq_ipv6.o
34-
obj-$(CONFIG_NFT_REDIR_IPV6) += nft_redir_ipv6.o
3534
obj-$(CONFIG_NFT_DUP_IPV6) += nft_dup_ipv6.o
3635
obj-$(CONFIG_NFT_FIB_IPV6) += nft_fib_ipv6.o
3736

net/ipv6/netfilter/nft_redir_ipv6.c

Lines changed: 0 additions & 83 deletions
This file was deleted.

net/netfilter/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,7 @@ config NFT_REDIR
541541
depends on NF_CONNTRACK
542542
depends on NF_NAT
543543
tristate "Netfilter nf_tables redirect support"
544+
select NF_NAT_REDIRECT
544545
help
545546
This options adds the "redirect" expression that you can use
546547
to perform NAT in the redirect flavour.

0 commit comments

Comments
 (0)