summaryrefslogtreecommitdiffstats
path: root/include/net/netfilter
diff options
context:
space:
mode:
authorArturo Borrero2014-09-04 14:06:49 +0200
committerPablo Neira Ayuso2014-09-09 16:31:29 +0200
commitbe6b635cd674add9410efa9ac6f03e0040848b12 (patch)
treeace7d6c1ecd491aa68d3a1b3ad4b8829dd40305f /include/net/netfilter
parentnetfilter: nf_nat: generalize IPv4 masquerading support for nf_tables (diff)
downloadkernel-qcow2-linux-be6b635cd674add9410efa9ac6f03e0040848b12.tar.gz
kernel-qcow2-linux-be6b635cd674add9410efa9ac6f03e0040848b12.tar.xz
kernel-qcow2-linux-be6b635cd674add9410efa9ac6f03e0040848b12.zip
netfilter: nf_nat: generalize IPv6 masquerading support for nf_tables
Let's refactor the code so we can reach the masquerade functionality from outside the xt context (ie. nftables). The patch includes the addition of an atomic counter to the masquerade notifier: the stuff to be done by the notifier is the same for xt and nftables. Therefore, only one notification handler is needed. This factorization only involves IPv6; a similar patch exists to handle IPv4. Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter')
-rw-r--r--include/net/netfilter/ipv6/nf_nat_masquerade.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/netfilter/ipv6/nf_nat_masquerade.h b/include/net/netfilter/ipv6/nf_nat_masquerade.h
new file mode 100644
index 000000000000..0a13396cd390
--- /dev/null
+++ b/include/net/netfilter/ipv6/nf_nat_masquerade.h
@@ -0,0 +1,10 @@
+#ifndef _NF_NAT_MASQUERADE_IPV6_H_
+#define _NF_NAT_MASQUERADE_IPV6_H_
+
+unsigned int
+nf_nat_masquerade_ipv6(struct sk_buff *skb, const struct nf_nat_range *range,
+ const struct net_device *out);
+void nf_nat_masquerade_ipv6_register_notifier(void);
+void nf_nat_masquerade_ipv6_unregister_notifier(void);
+
+#endif /* _NF_NAT_MASQUERADE_IPV6_H_ */