]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
parser_bison: Allow flushing flow tables
authorElise Lennion <elise.lennion@gmail.com>
Fri, 17 Mar 2017 15:03:17 +0000 (12:03 -0300)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 20 Mar 2017 10:17:23 +0000 (11:17 +0100)
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 <elise.lennion@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/parser_bison.y

index 5d3d106948237c9e183f5fd06f950223d7ddc710..e44ff44d761c7cbec3d8ac0ae2341186f44dfb5c 100644 (file)
@@ -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);