]> 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)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 2 Nov 2023 10:56:20 +0000 (11:56 +0100)
commit 61eab46ee62a72629fa86c1929e73a2bfa95bc02 upstream.

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 1d3ad5377ff3490cf306f61c8a64ee3f43a5bc06..736c356b45a4dcb2e8a425cbd1bb99951ed7a382 100644 (file)
@@ -2077,6 +2077,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   data_type_expr
                                                stmt_separator  close_scope_type