diff options
author | Phil Oester <kernel@linuxace.com> | 2013-11-30 12:41:21 -0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-11-30 21:50:03 +0100 |
commit | f80dcf92168e96ccf9f6889b73c5024391874676 (patch) | |
tree | c5afc3561c296a460c6325a68b29ac5ac2f68239 /src | |
parent | af979654f9098232b18c6f3c3b40c54143d13629 (diff) |
parser: add 'delete map' syntax
Creating a map is done via "add map". However, to delete a map requires using
"delete set", which is confusing. Add the appropriate synonym to parser.
The downside to this is that one can now delete a set with "delete map", but
this seems a minor issue. It could of course be fixed by adding a new
CMD_OBJ_MAP.
This closes netfilter bugzilla #879.
Reported-by: Bjørnar Ness <bjornar.ness@gmail.com>
Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/parser.y | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser.y b/src/parser.y index c6f8c9d4..26e71e37 100644 --- a/src/parser.y +++ b/src/parser.y @@ -605,6 +605,10 @@ delete_cmd : TABLE table_spec { $$ = cmd_alloc(CMD_DELETE, CMD_OBJ_SET, &$2, &@$, NULL); } + | MAP set_spec + { + $$ = cmd_alloc(CMD_DELETE, CMD_OBJ_SET, &$2, &@$, NULL); + } | ELEMENT set_spec set_expr { $$ = cmd_alloc(CMD_DELETE, CMD_OBJ_SETELEM, &$2, &@$, $3); |