From: Elise Lennion Date: Fri, 17 Mar 2017 15:03:17 +0000 (-0300) Subject: parser_bison: Allow flushing flow tables X-Git-Tag: v0.8~191 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2daa0ee27fe13a9d64105f29144038fcaf4e7e1d;p=thirdparty%2Fnftables.git parser_bison: Allow flushing flow tables This patch enables the command flush on flow tables, which removes all entries in it: $ nft flush flow table filter ft-https Command above flushes flow table 'ft-https' in table 'filter'. Signed-off-by: Elise Lennion Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/parser_bison.y b/src/parser_bison.y index 5d3d1069..e44ff44d 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -1127,6 +1127,10 @@ flush_cmd : TABLE table_spec { $$ = cmd_alloc(CMD_FLUSH, CMD_OBJ_SET, &$2, &@$, NULL); } + | FLOW TABLE set_spec + { + $$ = cmd_alloc(CMD_FLUSH, CMD_OBJ_SET, &$3, &@$, NULL); + } | RULESET ruleset_spec { $$ = cmd_alloc(CMD_FLUSH, CMD_OBJ_RULESET, &$2, &@$, NULL);