Skip to contentSkip to conversation

netfilter: fix NETFILTER_XT_TARGET_TEE dependencies

PATCH Applied Arnd Bergmann 2 participants 2 messages Mar 13, 2019 – Mar 18, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 netfilter: fix NETFILTER_XT_TARGET_TEE dependencies

With NETFILTER_XT_TARGET_TEE=y and IP6_NF_IPTABLES=m, we get a link error when referencing the NF_DUP_IPV6 module:

net/netfilter/xt_TEE.o: In function `tee_tg6':
xt_TEE.c:(.text+0x14): undefined reference to `nf_dup_ipv6'

The problem here is the 'select NF_DUP_IPV6 if IP6_NF_IPTABLES' that forces NF_DUP_IPV6 to be =m as well rather than setting it to =y as was intended here. Adding a soft dependency on IP6_NF_IPTABLES avoids that broken configuration.

Fixes 5d400a4933e8 ("netfilter: Kconfig: Change select IPv6 dependencies")
Cc Máté Eckl <[email protected]>
Cc Taehee Yoo <[email protected]>

---
Resending this one, I had sent another version before last July, and then Máté Eckl did a combined version that I thought was sufficient, but I had left my old patch in the randconfig build tree, so I failed to notice that it was still required.

Taehee Yoo also prepared a patch to address this, but that patch was never merged, and I suspect it did not catch all cases either, so we still need mine.

---
 net/netfilter/Kconfig | 1 +
 1 file changed, 1 insertion(+)
net/netfilter/Kconfig +1 -0
index 964bc317ad0a..ca3ba7548998 100644
@@ -1008,6 +1008,7 @@ config NETFILTER_XT_TARGET_TEE
 	depends on NETFILTER_ADVANCED
 	depends on IPV6 || IPV6=n
 	depends on !NF_CONNTRACK || NF_CONNTRACK
+	depends on IP6_NF_IPTABLES || !IP6_NF_IPTABLES
 	select NF_DUP_IPV4
 	select NF_DUP_IPV6 if IP6_NF_IPTABLES
 	---help---
Signature · 1 line
2.20.0
maintainer Applied
#1 lore raw
Quoted 10 lines · Arnd Bergmann

With NETFILTER_XT_TARGET_TEE=y and IP6_NF_IPTABLES=m, we get a link error when referencing the NF_DUP_IPV6 module:

net/netfilter/xt_TEE.o: In function `tee_tg6':
xt_TEE.c:(.text+0x14): undefined reference to `nf_dup_ipv6'

The problem here is the 'select NF_DUP_IPV6 if IP6_NF_IPTABLES' that forces NF_DUP_IPV6 to be =m as well rather than setting it to =y as was intended here. Adding a soft dependency on IP6_NF_IPTABLES avoids that broken configuration.

Applied, thanks Arnd.