[PATCH nft 1/2] src: use 'flow add' syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As discussed during NFWS 2018. Old syntax is stilled allowed.

Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 src/ct.c           | 2 +-
 src/parser_bison.y | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/ct.c b/src/ct.c
index e77c3201eb5d..ca31f49850d4 100644
--- a/src/ct.c
+++ b/src/ct.c
@@ -481,7 +481,7 @@ struct stmt *notrack_stmt_alloc(const struct location *loc)
 static void flow_offload_stmt_print(const struct stmt *stmt,
 				    struct output_ctx *octx)
 {
-	printf("flow offload @%s", stmt->flow.table_name);
+	printf("flow add @%s", stmt->flow.table_name);
 }
 
 static const struct stmt_ops flow_offload_stmt_ops = {
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 48e44e5adc40..65b3fb3ebac2 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -3915,6 +3915,10 @@ meta_stmt		:	META	meta_key	SET	stmt_expr
 			{
 				$$ = flow_offload_stmt_alloc(&@$, $4);
 			}
+			|	FLOW	ADD	AT string
+			{
+				$$ = flow_offload_stmt_alloc(&@$, $4);
+			}
 			;
 
 socket_expr		:	SOCKET	socket_key
-- 
2.11.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux