netfilter: Fix build for NETFILTER_XT_TARGET_REDIRECT
Subsystems (3)
PATCH 1/1 netfilter: Fix build for NETFILTER_XT_TARGET_REDIRECT
Fix:
ERROR: "nf_nat_redirect_ipv6" [net/netfilter/xt_REDIRECT.ko] undefined!
Seen if NETFILTER_XT_TARGET_REDIRECT is configured but NF_NAT_IPV6 is not, since code compiled with NF_NAT_REDIRECT_IPV6 is used unconditionally by code enabled with NETFILTER_XT_TARGET_REDIRECT. This means that NETFILTER_XT_TARGET_REDIRECT depends on NF_NAT_IPV6 and must always select NF_NAT_REDIRECT_IPV6.
---
Seen in and applies to -next. See various qemu test failures reported at http://server.roeck-us.net:8010/builders,
net/netfilter/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/netfilter/Kconfig +2 -2
@@ -843,9 +843,9 @@ config NETFILTER_XT_TARGET_RATEEST config NETFILTER_XT_TARGET_REDIRECT tristate "REDIRECT target support" - depends on NF_NAT + depends on NF_NAT && NF_NAT_IPV6 select NF_NAT_REDIRECT_IPV4 if NF_NAT_IPV4 - select NF_NAT_REDIRECT_IPV6 if NF_NAT_IPV6 + select NF_NAT_REDIRECT_IPV6 ---help--- REDIRECT is a special case of NAT: all incoming connections are mapped onto the incoming interface's address, causing the packets to
Signature · 1 line
1.9.1
Pablo Neira Ayuso
maintainerQuoted 9 lines · Guenter Roeck
Fix:
ERROR: "
nf_nat_redirect_ipv6" [net/netfilter/xt_REDIRECT.ko] undefined!Seen if
NETFILTER_XT_TARGET_REDIRECTis configured butNF_NAT_IPV6is not, since code compiled withNF_NAT_REDIRECT_IPV6is used unconditionally by code enabled withNETFILTER_XT_TARGET_REDIRECT. This means thatNETFILTER_XT_TARGET_REDIRECTdepends onNF_NAT_IPV6and must always selectNF_NAT_REDIRECT_IPV6.
Thanks for your patch. However, we decided to resolve this by combining nf_reject_ipv4 and nf_reject_ipv6.
See b59eaf9 ("netfilter: combine IPv4 and IPv6 nf_nat_redirect code in one module").
Let us know if you still hit problems after that patch. Thanks.