aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/netfilter
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-05-14 23:46:57 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-05-23 09:14:05 +0200
commit1cd472bf036ca038e783ef5f058f54e45b7e8180 (patch)
tree5ed963b70fd9c6038d62e0704ac9c0aeb349c358 /include/net/netfilter
parentnetfilter: core: export raw versions of add/delete hook functions (diff)
downloadlinux-dev-1cd472bf036ca038e783ef5f058f54e45b7e8180.tar.xz
linux-dev-1cd472bf036ca038e783ef5f058f54e45b7e8180.zip
netfilter: nf_nat: add nat hook register functions to nf_nat
This adds the infrastructure to register nat hooks with the nat core instead of the netfilter core. nat hooks are used to configure nat bindings. Such hooks are registered from ip(6)table_nat or by the nftables core when a nat chain is added. After next patch, nat hooks will be registered with nf_nat instead of netfilter core. This allows to use many nat lookup functions at the same time while doing the real packet rewrite (nat transformation) in one place. This change doesn't convert the intended users yet to ease review. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter')
-rw-r--r--include/net/netfilter/nf_nat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h
index da3d601cadee..a17eb2f8d40e 100644
--- a/include/net/netfilter/nf_nat.h
+++ b/include/net/netfilter/nf_nat.h
@@ -75,4 +75,8 @@ static inline bool nf_nat_oif_changed(unsigned int hooknum,
#endif
}
+int nf_nat_register_fn(struct net *net, const struct nf_hook_ops *ops,
+ const struct nf_hook_ops *nat_ops, unsigned int ops_count);
+void nf_nat_unregister_fn(struct net *net, const struct nf_hook_ops *ops,
+ unsigned int ops_count);
#endif