]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
parser: permit gc-interval in map declarations
authorFlorian Westphal <fw@strlen.de>
Mon, 21 Aug 2023 14:12:52 +0000 (16:12 +0200)
committerFlorian Westphal <fw@strlen.de>
Tue, 29 Aug 2023 16:10:15 +0000 (18:10 +0200)
Maps support timeouts, so allow to set the gc interval as well.

Fixes: 949cc39eb93f ("parser: support of maps with timeout")
Signed-off-by: Florian Westphal <fw@strlen.de>
src/parser_bison.y

index 5637829332ce28ca1be3ea57d4b15050914d46fb..7b8eac9577ef3f11fa21729cccb0126c4602f589 100644 (file)
@@ -2237,6 +2237,11 @@ map_block                :       /* empty */     { $$ = $<set>-1; }
                                $1->timeout = $3;
                                $$ = $1;
                        }
+                       |       map_block       GC_INTERVAL     time_spec       stmt_separator
+                       {
+                               $1->gc_int = $3;
+                               $$ = $1;
+                       }
                        |       map_block       TYPE
                                                data_type_expr  COLON   map_block_data_interval data_type_expr
                                                stmt_separator  close_scope_type