summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2014-10-06 21:51:24 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2014-10-09 18:46:36 +0200
commitcf8c90ea9985c9019b002037629ee362b5c50343 (patch)
tree34f830fcf6c69590a304e23351cafba9fafb86cb /include
parentb0fedf634ce4ce81212294e5bef554dcd46746e1 (diff)
src: add masquerade support
This patch adds masquerade support for nft. The syntax is: % nft add rule nat postrouting masquerade [flags] Currently, flags are: random, random-fully, persistent Example: % nft add rule nat postrouting masquerade random,persistent Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/statement.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/statement.h b/include/statement.h
index e5232542..35c1b7ae 100644
--- a/include/statement.h
+++ b/include/statement.h
@@ -73,6 +73,12 @@ struct nat_stmt {
extern struct stmt *nat_stmt_alloc(const struct location *loc);
+struct masq_stmt {
+ uint32_t flags;
+};
+
+extern struct stmt *masq_stmt_alloc(const struct location *loc);
+
struct queue_stmt {
struct expr *queue;
uint16_t flags;
@@ -103,6 +109,7 @@ extern struct stmt *ct_stmt_alloc(const struct location *loc,
* @STMT_LOG: log statement
* @STMT_REJECT: REJECT statement
* @STMT_NAT: NAT statement
+ * @STMT_MASQ: masquerade statement
* @STMT_QUEUE: QUEUE statement
* @STMT_CT: conntrack statement
*/
@@ -116,6 +123,7 @@ enum stmt_types {
STMT_LOG,
STMT_REJECT,
STMT_NAT,
+ STMT_MASQ,
STMT_QUEUE,
STMT_CT,
};
@@ -163,6 +171,7 @@ struct stmt {
struct limit_stmt limit;
struct reject_stmt reject;
struct nat_stmt nat;
+ struct masq_stmt masq;
struct queue_stmt queue;
struct ct_stmt ct;
};