]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: tee: select NF_DUP_IPV6 unconditionally
authorArnd Bergmann <arnd@arndb.de>
Fri, 5 Feb 2016 09:20:21 +0000 (10:20 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 8 Feb 2016 11:58:28 +0000 (12:58 +0100)
commit3421cf80bcf5d764f2a25f54563b5d75af3dd21b
treef8ff51f973c346ffe23ec72a6279b7235a932cd9
parent6bffea07252b7c9f30f7377f8ffa0133146e2553
netfilter: tee: select NF_DUP_IPV6 unconditionally

The NETFILTER_XT_TARGET_TEE option selects NF_DUP_IPV6 whenever
IP6_NF_IPTABLES is enabled, and it ensures that it cannot be
builtin itself if NF_CONNTRACK is a loadable module, as that
is a dependency for NF_DUP_IPV6.

However, NF_DUP_IPV6 can be enabled even if IP6_NF_IPTABLES is
turned off, and it only really depends on IPV6. With the current
check in tee_tg6, we call nf_dup_ipv6() whenever NF_DUP_IPV6
is enabled. This can however be a loadable module which is
unreachable from a built-in xt_TEE:

net/built-in.o: In function `tee_tg6':
:(.text+0x67728): undefined reference to `nf_dup_ipv6'

The bug was originally introduced in the split of the xt_TEE module
into separate modules for ipv4 and ipv6, and two patches tried
to fix it unsuccessfully afterwards.

This is a revert of the the first incorrect attempt to fix it,
going back to depending on IPV6 as the dependency, and we
adapt the 'select' condition accordingly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: b9d5880b36ae ("netfilter: factor out packet duplication for IPv4/IPv6")
Fixes: 399ea5d15eaf ("netfilter: xt_TEE: use IS_ENABLED(CONFIG_NF_DUP_IPV6)")
Fixes: 98efa1f67118 ("netfilter: fix xt_TEE and xt_TPROXY dependencies")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/Kconfig
net/netfilter/xt_TEE.c