aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/netfilter
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2014-10-17 12:39:09 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2014-10-27 22:49:39 +0100
commite9105f1bead4ec3f64904564c7c6268185d6b363 (patch)
treec2b91e5f3183503759fd8759cdeb9bf3ccf45af2 /include/net/netfilter
parentnetfilter: refactor NAT redirect IPv6 code to use it from nf_tables (diff)
downloadlinux-dev-e9105f1bead4ec3f64904564c7c6268185d6b363.tar.xz
linux-dev-e9105f1bead4ec3f64904564c7c6268185d6b363.zip
netfilter: nf_tables: add new expression nft_redir
This new expression provides NAT in the redirect flavour, which is to redirect packets to local machine. 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/nft_redir.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/net/netfilter/nft_redir.h b/include/net/netfilter/nft_redir.h
new file mode 100644
index 000000000000..a2d67546afab
--- /dev/null
+++ b/include/net/netfilter/nft_redir.h
@@ -0,0 +1,21 @@
+#ifndef _NFT_REDIR_H_
+#define _NFT_REDIR_H_
+
+struct nft_redir {
+ enum nft_registers sreg_proto_min:8;
+ enum nft_registers sreg_proto_max:8;
+ u16 flags;
+};
+
+extern const struct nla_policy nft_redir_policy[];
+
+int nft_redir_init(const struct nft_ctx *ctx,
+ const struct nft_expr *expr,
+ const struct nlattr * const tb[]);
+
+int nft_redir_dump(struct sk_buff *skb, const struct nft_expr *expr);
+
+int nft_redir_validate(const struct nft_ctx *ctx, const struct nft_expr *expr,
+ const struct nft_data **data);
+
+#endif /* _NFT_REDIR_H_ */