Message ID | 20131130204121.GA23143@home |
---|---|
State | Accepted |
Headers | show |
On Sat, Nov 30, 2013 at 12:41:21PM -0800, Phil Oester wrote: > 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. Applied this fix as well. Thanks. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/src/parser.y b/src/parser.y index a49e5c2..c736240 100644 --- a/src/parser.y +++ b/src/parser.y @@ -604,6 +604,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);
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>