Skip to contentSkip to conversation

parser_bison: allow to used named limit from dictionaries too

PATCH New Pablo Neira Ayuso 1 participant 1 message Oct 2, 2017 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 parser_bison: allow to used named limit from dictionaries too

Allow to use limit objects from dictionaries.

Fixes c0697eabe832 ("src: add stateful object support for limit")
---
 src/parser_bison.y | 9 +++++++++
 1 file changed, 9 insertions(+)
src/parser_bison.y +9 -0
index f996d9d94880..7016f5b24887 100644
@@ -1426,6 +1426,15 @@ map_block		:	/* empty */	{ $$ = $<set>-1; }
 				$1->flags  |= NFT_SET_OBJECT;
 				$$ = $1;
 			}
+			|	map_block	TYPE
+						data_type_expr	COLON	LIMIT
+						stmt_separator
+			{
+				$1->key = $3;
+				$1->objtype = NFT_OBJECT_LIMIT;
+				$1->flags  |= NFT_SET_OBJECT;
+				$$ = $1;
+			}
 			|	map_block	FLAGS		set_flag_list	stmt_separator
 			{
 				$1->flags |= $3;
Signature · 1 line
2.1.4