Skip to content

Commit d11b04c

Browse files
ummakynesgregkh
authored andcommitted
netfilter: nf_tables: NAT chain and extensions require NF_TABLES
[ Upstream commit 39f2ff0 ] Move these options inside the scope of the 'if' NF_TABLES and NF_TABLES_IPV6 dependencies. This patch fixes: net/ipv6/netfilter/nft_chain_nat_ipv6.o: In function `nft_nat_do_chain': >> net/ipv6/netfilter/nft_chain_nat_ipv6.c:37: undefined reference to `nft_do_chain' net/ipv6/netfilter/nft_chain_nat_ipv6.o: In function `nft_chain_nat_ipv6_exit': >> net/ipv6/netfilter/nft_chain_nat_ipv6.c:94: undefined reference to `nft_unregister_chain_type' net/ipv6/netfilter/nft_chain_nat_ipv6.o: In function `nft_chain_nat_ipv6_init': >> net/ipv6/netfilter/nft_chain_nat_ipv6.c:87: undefined reference to `nft_register_chain_type' that happens with: CONFIG_NF_TABLES=m CONFIG_NFT_CHAIN_NAT_IPV6=y Fixes: 02c7b25 ("netfilter: nf_tables: build-in filter chain type") Reported-by: kbuild test robot <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 348288a commit d11b04c

File tree

1 file changed

+28
-27
lines changed

1 file changed

+28
-27
lines changed

Diff for: net/ipv6/netfilter/Kconfig

+28-27
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,34 @@ config NFT_CHAIN_ROUTE_IPV6
4848
fields such as the source, destination, flowlabel, hop-limit and
4949
the packet mark.
5050

51+
if NF_NAT_IPV6
52+
53+
config NFT_CHAIN_NAT_IPV6
54+
tristate "IPv6 nf_tables nat chain support"
55+
help
56+
This option enables the "nat" chain for IPv6 in nf_tables. This
57+
chain type is used to perform Network Address Translation (NAT)
58+
packet transformations such as the source, destination address and
59+
source and destination ports.
60+
61+
config NFT_MASQ_IPV6
62+
tristate "IPv6 masquerade support for nf_tables"
63+
depends on NFT_MASQ
64+
select NF_NAT_MASQUERADE_IPV6
65+
help
66+
This is the expression that provides IPv4 masquerading support for
67+
nf_tables.
68+
69+
config NFT_REDIR_IPV6
70+
tristate "IPv6 redirect support for nf_tables"
71+
depends on NFT_REDIR
72+
select NF_NAT_REDIRECT
73+
help
74+
This is the expression that provides IPv4 redirect support for
75+
nf_tables.
76+
77+
endif # NF_NAT_IPV6
78+
5179
config NFT_REJECT_IPV6
5280
select NF_REJECT_IPV6
5381
default NFT_REJECT
@@ -99,39 +127,12 @@ config NF_NAT_IPV6
99127

100128
if NF_NAT_IPV6
101129

102-
config NFT_CHAIN_NAT_IPV6
103-
depends on NF_TABLES_IPV6
104-
tristate "IPv6 nf_tables nat chain support"
105-
help
106-
This option enables the "nat" chain for IPv6 in nf_tables. This
107-
chain type is used to perform Network Address Translation (NAT)
108-
packet transformations such as the source, destination address and
109-
source and destination ports.
110-
111130
config NF_NAT_MASQUERADE_IPV6
112131
tristate "IPv6 masquerade support"
113132
help
114133
This is the kernel functionality to provide NAT in the masquerade
115134
flavour (automatic source address selection) for IPv6.
116135

117-
config NFT_MASQ_IPV6
118-
tristate "IPv6 masquerade support for nf_tables"
119-
depends on NF_TABLES_IPV6
120-
depends on NFT_MASQ
121-
select NF_NAT_MASQUERADE_IPV6
122-
help
123-
This is the expression that provides IPv4 masquerading support for
124-
nf_tables.
125-
126-
config NFT_REDIR_IPV6
127-
tristate "IPv6 redirect support for nf_tables"
128-
depends on NF_TABLES_IPV6
129-
depends on NFT_REDIR
130-
select NF_NAT_REDIRECT
131-
help
132-
This is the expression that provides IPv4 redirect support for
133-
nf_tables.
134-
135136
endif # NF_NAT_IPV6
136137

137138
config IP6_NF_IPTABLES

0 commit comments

Comments
 (0)