netfilter: move checksum_partial indirection to struct nf_ipv6_ops
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 20 Dec 2017 15:04:18 +0000 (16:04 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 8 Jan 2018 17:01:24 +0000 (18:01 +0100)
commitf7dcbe2f36a660140ecb286e15f502028d96ffdf
tree9cb6039e86358b2ba09230d5737485786bc1cc75
parentef71fe27ec2f1607e38af160ab261a8d8ef8e121
netfilter: move checksum_partial indirection to struct nf_ipv6_ops

We cannot make a direct call to nf_ip6_checksum_partial() because that
would result in autoloading the 'ipv6' module because of symbol
dependencies.  Therefore, define checksum_partial 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/utils.c