diff options
author | Florian Westphal <fw@strlen.de> | 2019-02-02 10:16:59 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-02-04 18:20:19 +0100 |
commit | 960587285a56ec3cafb4d1e6b25c19eced4d0bce (patch) | |
tree | d70558e4e626a4fa43df2fbda1015b8095c4f000 /net/ipv6/netfilter.c | |
parent | a46c52d9f2659498f0c0871f7f2333a692c243fe (diff) | |
download | linux-stable-960587285a56ec3cafb4d1e6b25c19eced4d0bce.tar.gz linux-stable-960587285a56ec3cafb4d1e6b25c19eced4d0bce.tar.bz2 linux-stable-960587285a56ec3cafb4d1e6b25c19eced4d0bce.zip |
netfilter: nat: remove module dependency on ipv6 core
nf_nat_ipv6 calls two ipv6 core functions, so add those to v6ops to avoid
the module dependency.
This is a prerequisite for merging ipv4 and ipv6 nat implementations.
Add wrappers to avoid the indirection if ipv6 is builtin.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6/netfilter.c')
-rw-r--r-- | net/ipv6/netfilter.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c index 8b075f0bc351..0a5caf263889 100644 --- a/net/ipv6/netfilter.c +++ b/net/ipv6/netfilter.c @@ -112,6 +112,10 @@ static const struct nf_ipv6_ops ipv6ops = { .fragment = ip6_fragment, .route = nf_ip6_route, .reroute = nf_ip6_reroute, +#if IS_MODULE(CONFIG_IPV6) + .route_me_harder = ip6_route_me_harder, + .dev_get_saddr = ipv6_dev_get_saddr, +#endif }; int __init ipv6_netfilter_init(void) |