[PATCH nft] parser_bison: stateful statement support in map

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

 



Missing parser extension to support for stateful statements in map.

Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 src/parser_bison.y | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/parser_bison.y b/src/parser_bison.y
index 5545a43d160e..b9b3d026a4ee 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -2052,6 +2052,12 @@ map_block		:	/* empty */	{ $$ = $<set>-1; }
 				$1->flags |= $3;
 				$$ = $1;
 			}
+			|	map_block	stateful_stmt_list		stmt_separator
+			{
+				list_splice_tail($2, &$1->stmt_list);
+				$$ = $1;
+				free($2);
+			}
 			|	map_block	ELEMENTS	'='		set_block_expr
 			{
 				$1->init = $4;
-- 
2.20.1




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

  Powered by Linux