netfilter: fix NETFILTER_XT_TARGET_TEE dependencies
Subsystems (3)
PATCH 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.
--- net/netfilter/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/netfilter/Kconfig +2 -1
@@ -985,7 +985,8 @@ config NETFILTER_XT_TARGET_TEE tristate '"TEE" - packet cloning to alternate destination' depends on NETFILTER_ADVANCED depends on IPV6 || IPV6=n - depends on !NF_CONNTRACK || NF_CONNTRACK + 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.9.0
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_IPV6module:
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_IPV6ifIP6_NF_IPTABLES' that forcesNF_DUP_IPV6to be =m as well rather than setting it to =y as was intended here. Adding a soft dependency onIP6_NF_IPTABLESavoids that broken configuration.
Applied to nf.git, thanks Arnd.
Pablo Neira Ayuso
maintainerQuoted 7 lines · Pablo Neira Ayuso
Quoted 6 lines · Arnd Bergmann
With NETFILTER_XT_TARGET_TEE=y and IP6_NF_IPTABLES=m, we get a link error when referencing the
NF_DUP_IPV6module:
net/netfilter/xt_TEE.o: In function `tee_tg6':
xt_TEE.c:(.text+0x14): undefined reference to `nf_dup_ipv6'
Quoted 6 lines
Quoted 4 lines
The problem here is the 'select
NF_DUP_IPV6ifIP6_NF_IPTABLES' that forcesNF_DUP_IPV6to be =m as well rather than setting it to =y as was intended here. Adding a soft dependency onIP6_NF_IPTABLESavoids that broken configuration.Applied to nf.git, thanks Arnd.
Sorry, let me reconsider.
We many need similar patches to other spots in 35bf1ccecaaa ?
If so, it would be good to fix in the one go.
Thanks!
Quoted 13 lines · Pablo Neira Ayuso
Quoted 12 lines · Pablo Neira Ayuso
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_IPV6module:
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_IPV6ifIP6_NF_IPTABLES' that forcesNF_DUP_IPV6to be =m as well rather than setting it to =y as was intended here. Adding a soft dependency onIP6_NF_IPTABLESavoids that broken configuration.
Quoted 7 lines
Quoted 1 line
Applied to nf.git, thanks Arnd.
Sorry, let me reconsider.
We many need similar patches to other spots in
35bf1ccecaaa?If so, it would be good to fix in the one go.
I'm fairly sure that NETFILTER_XT_TARGET_LOG is safe, since NF_LOG_IPV6 already depends on IP6_NF_IPTABLES.
NF_SOCKET_IPV6 like NF_DUP_IPV6 does not depend on IP6_NF_IPTABLES, so we may have a similar problem there, though I have not come across that. I have done only a few hundred randconfig builds since I started yesterday, so I may have missed something, but I think this is safe because CONFIG_NF_SOCKET_IPV6 is used like a 'bool' symbol these days, we don't actually control building a module with it, only a small portion in the nft_socket file.
Arnd
Quoted 25 lines · Arnd Bergmann
Quoted 13 lines · Pablo Neira Ayuso
Quoted 12 lines · Pablo Neira Ayuso
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_IPV6module:
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_IPV6ifIP6_NF_IPTABLES' that forcesNF_DUP_IPV6to be =m as well rather than setting it to =y as was intended here. Adding a soft dependency onIP6_NF_IPTABLESavoids that broken configuration.Quoted 7 lines
Quoted 1 line
Applied to nf.git, thanks Arnd.
Sorry, let me reconsider.
We many need similar patches to other spots in
35bf1ccecaaa?If so, it would be good to fix in the one go.
I'm fairly sure that
NETFILTER_XT_TARGET_LOGis safe, sinceNF_LOG_IPV6already depends onIP6_NF_IPTABLES.
Quoted 7 lines
NF_SOCKET_IPV6likeNF_DUP_IPV6does not depend onIP6_NF_IPTABLES, so we may have a similar problem there, though I have not come across that. I have done only a few hundred randconfig builds since I started yesterday, so I may have missed something, but I think this is safe becauseCONFIG_NF_SOCKET_IPV6is used like a 'bool' symbol these days, we don't actually control building a module with it, only a small portion in thenft_socketfile.
Thanks for explaining.
Applied, thanks!
Quoted 34 lines · Pablo Neira Ayuso
Quoted 25 lines · Arnd Bergmann
Quoted 13 lines · Pablo Neira Ayuso
Quoted 12 lines · Pablo Neira Ayuso
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_IPV6module:
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_IPV6ifIP6_NF_IPTABLES' that forcesNF_DUP_IPV6to be =m as well rather than setting it to =y as was intended here. Adding a soft dependency onIP6_NF_IPTABLESavoids that broken configuration.Quoted 7 lines
Quoted 1 line
Applied to nf.git, thanks Arnd.
Sorry, let me reconsider.
We many need similar patches to other spots in
35bf1ccecaaa?If so, it would be good to fix in the one go.
I'm fairly sure that
NETFILTER_XT_TARGET_LOGis safe, sinceNF_LOG_IPV6already depends onIP6_NF_IPTABLES.Quoted 7 lines
NF_SOCKET_IPV6likeNF_DUP_IPV6does not depend onIP6_NF_IPTABLES, so we may have a similar problem there, though I have not come across that. I have done only a few hundred randconfig builds since I started yesterday, so I may have missed something, but I think this is safe becauseCONFIG_NF_SOCKET_IPV6is used like a 'bool' symbol these days, we don't actually control building a module with it, only a small portion in thenft_socketfile.
Quoted 1 line
Thanks for explaining.
Unfortunately I came across a related build error that my patch failed to address. I've sent another patch for that one. Feel free to fold it into my first patch in case you rebased before you forward the patches to net-next.
Arnd