From 6f137a2db3419e961e41eda28668cd99e8a3f2e2 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 24 Nov 2015 21:26:27 +0100 Subject: src: add fwd statement for netdev This patch add support for the forward statement, only available at the netdev family. # nft add table netdev filter # nft add chain netdev filter ingress { type filter hook ingress device eth0 priority 0\; } # nft add rule netdev filter ingress fwd to dummy0 Signed-off-by: Pablo Neira Ayuso --- include/statement.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/statement.h b/include/statement.h index 6be3a240..102d95f1 100644 --- a/include/statement.h +++ b/include/statement.h @@ -122,6 +122,13 @@ struct dup_stmt { struct stmt *dup_stmt_alloc(const struct location *loc); uint32_t dup_stmt_type(const char *type); +struct fwd_stmt { + struct expr *to; +}; + +struct stmt *fwd_stmt_alloc(const struct location *loc); +uint32_t fwd_stmt_type(const char *type); + struct set_stmt { struct expr *set; struct expr *key; @@ -149,6 +156,7 @@ extern struct stmt *set_stmt_alloc(const struct location *loc); * @STMT_CT: conntrack statement * @STMT_SET: set statement * @STMT_DUP: dup statement + * @STMT_FWD: forward statement */ enum stmt_types { STMT_INVALID, @@ -167,6 +175,7 @@ enum stmt_types { STMT_CT, STMT_SET, STMT_DUP, + STMT_FWD, }; /** @@ -219,6 +228,7 @@ struct stmt { struct ct_stmt ct; struct set_stmt set; struct dup_stmt dup; + struct fwd_stmt fwd; }; }; -- cgit v1.2.3