diff mbox series

[nft] parser_bison: allow to used named limit from dictionaries too

Message ID 1507549692-9878-1-git-send-email-pablo@netfilter.org
State Not Applicable
Delegated to: Pablo Neira
Headers show
Series [nft] parser_bison: allow to used named limit from dictionaries too | expand

Commit Message

Pablo Neira Ayuso Oct. 9, 2017, 11:48 a.m. UTC
Allow to use limit objects from dictionaries.

Fixes: c0697eabe832 ("src: add stateful object support for limit")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 src/parser_bison.y | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Pablo Neira Ayuso Oct. 9, 2017, 11:59 a.m. UTC | #1
On Mon, Oct 09, 2017 at 01:48:11PM +0200, Pablo Neira Ayuso wrote:
> Allow to use limit objects from dictionaries.

Please, ignore this. My robot accidentally included this, this is
already upstream for a while.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/src/parser_bison.y b/src/parser_bison.y
index f996d9d94880..7016f5b24887 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -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;