netfilter: move reroute indirection to struct nf_ipv6_ops
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 27 Nov 2017 21:50:26 +0000 (22:50 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 8 Jan 2018 17:10:53 +0000 (18:10 +0100)
commitce388f452f0af2013c657dd24be4415d94e7704f
tree05f43955eee02314af8eab159ccbc2c0363c0c82
parent3f87c08c615f567799b426aff0341ea8010a0ebb
netfilter: move reroute indirection to struct nf_ipv6_ops

We cannot make a direct call to nf_ip6_reroute() because that would result
in autoloading the 'ipv6' module because of symbol dependencies.
Therefore, define reroute indirection in nf_ipv6_ops where this really
belongs to.

For IPv4, we can indeed make a direct function call, which is faster,
given IPv4 is built-in in the networking code by default. Still,
CONFIG_INET=n and CONFIG_NETFILTER=y is possible, so define empty inline
stub for IPv4 in such case.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter.h
include/linux/netfilter_ipv4.h
include/linux/netfilter_ipv6.h
net/bridge/netfilter/nf_tables_bridge.c
net/ipv4/netfilter.c
net/ipv6/netfilter.c
net/netfilter/nf_queue.c
net/netfilter/utils.c