diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-09-25 12:44:42 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-10-12 20:34:22 +0200 |
commit | 34689c201f03102861ff2e23ccd097a02663c5de (patch) | |
tree | 38a792601f33640420299aa7e34df9bd87eaea89 /src | |
parent | 46950a9f7366a686787306b749f95e16432951b6 (diff) |
parser_bison: show all sets via list sets with no family
Default to the same behaviour that we get through `list ruleset', ie.
# nft list sets
table ip test1 {
set foo {
type ipv4_addr
}
}
table ip6 test2 {
set bar {
type ipv6_addr
}
}
# nft list sets ip
table ip test1 {
set foo {
type ipv4_addr
}
}
# nft list sets ip6
table ip6 test2 {
set bar {
type ipv6_addr
}
}
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/parser_bison.y | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y index 86e2dc95..98480b60 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -416,8 +416,8 @@ static void location_update(struct location *loc, struct location *rhs, int n) %type <cmd> base_cmd add_cmd create_cmd insert_cmd delete_cmd list_cmd flush_cmd rename_cmd export_cmd monitor_cmd describe_cmd %destructor { cmd_free($$); } base_cmd add_cmd create_cmd insert_cmd delete_cmd list_cmd flush_cmd rename_cmd export_cmd monitor_cmd describe_cmd -%type <handle> table_spec tables_spec chain_spec chain_identifier ruleid_spec ruleset_spec -%destructor { handle_free(&$$); } table_spec tables_spec chain_spec chain_identifier ruleid_spec ruleset_spec +%type <handle> table_spec chain_spec chain_identifier ruleid_spec ruleset_spec +%destructor { handle_free(&$$); } table_spec chain_spec chain_identifier ruleid_spec ruleset_spec %type <handle> set_spec set_identifier %destructor { handle_free(&$$); } set_spec set_identifier %type <val> handle_spec family_spec family_spec_explicit position_spec chain_policy @@ -784,7 +784,7 @@ list_cmd : TABLE table_spec { $$ = cmd_alloc(CMD_LIST, CMD_OBJ_CHAINS, &$2, &@$, NULL); } - | SETS tables_spec + | SETS ruleset_spec { $$ = cmd_alloc(CMD_LIST, CMD_OBJ_SETS, &$2, &@$, NULL); } @@ -1195,14 +1195,6 @@ table_spec : family_spec identifier } ; -tables_spec : family_spec - { - memset(&$$, 0, sizeof($$)); - $$.family = $1; - $$.table = NULL; - } - ; - chain_spec : table_spec identifier { $$ = $1; |