netfilter: avoid ipv6 -> nf_defrag_ipv6 module dependency
authorFlorian Westphal <fw@strlen.de>
Mon, 10 Aug 2020 11:52:15 +0000 (13:52 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 13 Aug 2020 02:16:15 +0000 (04:16 +0200)
commit2404b73c3f1a5f15726c6ecd226b56f6f992767f
tree96c0ae1f4326683996d22d6a5d317090b0733449
parent2f941622fd88328ca75806c45c9e9709286a0609
netfilter: avoid ipv6 -> nf_defrag_ipv6 module dependency

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>
include/linux/netfilter_ipv6.h
net/bridge/netfilter/nf_conntrack_bridge.c
net/ipv6/netfilter.c