summaryrefslogtreecommitdiffstats
path: root/src/parser_bison.y
diff options
context:
space:
mode:
authorElise Lennion <elise.lennion@gmail.com>2017-03-17 12:04:06 -0300
committerPablo Neira Ayuso <pablo@netfilter.org>2017-03-20 11:17:23 +0100
commit6d37dae4b313e162d3196c2e5aa1670dbaf43bff (patch)
tree9da62041a0e290aa0e457f230f4e6e5863b470a7 /src/parser_bison.y
parent2daa0ee27fe13a9d64105f29144038fcaf4e7e1d (diff)
parser_bison: Allow flushing maps
This patch enables the command flush on maps, which removes all entries in it: $ nft flush map filter map1 Command above flushes map 'map1' in table 'filter'. The documentation was updated accordingly. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r--src/parser_bison.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index e44ff44d..841b2e17 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -1131,6 +1131,10 @@ flush_cmd : TABLE table_spec
{
$$ = cmd_alloc(CMD_FLUSH, CMD_OBJ_SET, &$3, &@$, NULL);
}
+ | MAP set_spec
+ {
+ $$ = cmd_alloc(CMD_FLUSH, CMD_OBJ_SET, &$2, &@$, NULL);
+ }
| RULESET ruleset_spec
{
$$ = cmd_alloc(CMD_FLUSH, CMD_OBJ_RULESET, &$2, &@$, NULL);