summaryrefslogtreecommitdiffstats
path: root/include/statement.h
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2014-11-03 21:20:11 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2014-11-04 14:38:04 +0100
commita7469ab47400bf4add8269a2908965e82ceefc48 (patch)
tree649d8911984c4a200dc1f61247b518e2d019a78f /include/statement.h
parent8f4c613c9c1aa0ea6b565bbd1c5332317a3e7fdc (diff)
src: add redirect support
This patch adds redirect support for nft. The syntax is: % nft add rule nat prerouting redirect [port] [nat_flags] Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/statement.h')
-rw-r--r--include/statement.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/statement.h b/include/statement.h
index 35c1b7ae..d1431215 100644
--- a/include/statement.h
+++ b/include/statement.h
@@ -79,6 +79,13 @@ struct masq_stmt {
extern struct stmt *masq_stmt_alloc(const struct location *loc);
+struct redir_stmt {
+ struct expr *proto;
+ uint32_t flags;
+};
+
+extern struct stmt *redir_stmt_alloc(const struct location *loc);
+
struct queue_stmt {
struct expr *queue;
uint16_t flags;
@@ -110,6 +117,7 @@ extern struct stmt *ct_stmt_alloc(const struct location *loc,
* @STMT_REJECT: REJECT statement
* @STMT_NAT: NAT statement
* @STMT_MASQ: masquerade statement
+ * @STMT_REDIR: redirect statement
* @STMT_QUEUE: QUEUE statement
* @STMT_CT: conntrack statement
*/
@@ -124,6 +132,7 @@ enum stmt_types {
STMT_REJECT,
STMT_NAT,
STMT_MASQ,
+ STMT_REDIR,
STMT_QUEUE,
STMT_CT,
};
@@ -172,6 +181,7 @@ struct stmt {
struct reject_stmt reject;
struct nat_stmt nat;
struct masq_stmt masq;
+ struct redir_stmt redir;
struct queue_stmt queue;
struct ct_stmt ct;
};