xt_TEE.c needs nf_dup_ipv6.c to support ipv6 packet duplication.
So that if xt_TEE is enabled, nf_dup_ipv6 will be automatically selected.
But there is build failure scenario.

test config:
CONFIG_NETFILTER_XT_TARGET_TEE=y
CONFIG_NF_DUP_IPV6=m

compile result:
net/netfilter/xt_TEE.o: In function `tee_tg6':
net/netfilter/xt_TEE.c:57: undefined reference to `nf_dup_ipv6'

This patch forces to avoid above config.

Fixes: 5d400a4933e8 ("netfilter: Kconfig: Change select IPv6 dependencies")
Reported-by: Randy Dunlap <rdun...@infradead.org>
Reported-by: Reported-by: Stephen Rothwell <s...@canb.auug.org.au>
Signed-off-by: Taehee Yoo <ap420...@gmail.com>
---
 net/netfilter/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index 2ab870ef233a..a0c2712290ea 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -1011,7 +1011,7 @@ config NETFILTER_XT_TARGET_TEE
        depends on IPV6 || IPV6=n
        depends on !NF_CONNTRACK || NF_CONNTRACK
        select NF_DUP_IPV4
-       select NF_DUP_IPV6 if IP6_NF_IPTABLES
+       select NF_DUP_IPV6 if IP6_NF_IPTABLES != n
        ---help---
        This option adds a "TEE" target with which a packet can be cloned and
        this clone be rerouted to another nexthop.
-- 
2.17.1

Reply via email to