netfilter: avoid ipv6 -> nf_defrag_ipv6 module dependency
authorFlorian Westphal <fw@strlen.de>
Mon, 10 Aug 2020 11:52:15 +0000 (13:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:29:32 +0000 (11:29 +0200)
commite3a5fa63a2e5b9a785d5ef1d4bdfc48965d3027e
tree1410417c6b3572205f017ef504b492dde36b6520
parent810b3c8b656a7ef46dc8ca044ddd967d23a7ddc5
netfilter: avoid ipv6 -> nf_defrag_ipv6 module dependency

[ Upstream commit 2404b73c3f1a5f15726c6ecd226b56f6f992767f ]

nf_ct_frag6_gather is part of nf_defrag_ipv6.ko, not ipv6 core.

The current use of the netfilter ipv6 stub indirections  causes a module
dependency between ipv6 and nf_defrag_ipv6.

This prevents nf_defrag_ipv6 module from being removed because ipv6 can't
be unloaded.

Remove the indirection and always use a direct call.  This creates a
depency from nf_conntrack_bridge to nf_defrag_ipv6 instead:

modinfo nf_conntrack
depends:        nf_conntrack,nf_defrag_ipv6,bridge

.. and nf_conntrack already depends on nf_defrag_ipv6 anyway.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/netfilter_ipv6.h
net/bridge/netfilter/nf_conntrack_bridge.c
net/ipv6/netfilter.c