summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-04-18 16:28:41 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-04-18 16:38:09 +0200
commit05ce01fdaf7f657725ce1e5e886813d036b05f25 (patch)
tree97e965fc9dd6a6b4d7bc301a335ec5e9e45645b9 /src/rule.c
parentda24c01b6d94820aee7222aa3c75854ef47bf355 (diff)
rule: fix nft list chain
Use netlink_list_chains instead of netlink_list_chain (note the final `s') After "nft list table filter" shows: table filter { chain input { } } "nft list chain filter input" shows: table filter { }
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rule.c b/src/rule.c
index 43b683ca..67ff5842 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -501,7 +501,10 @@ static int do_command_list(struct netlink_ctx *ctx, struct cmd *cmd)
case CMD_OBJ_CHAIN:
if (do_list_sets(ctx, table) < 0)
return -1;
- if (netlink_list_chain(ctx, &cmd->handle) < 0)
+ if (netlink_list_chains(ctx, &cmd->handle) < 0)
+ return -1;
+ list_splice_tail_init(&ctx->list, &table->chains);
+ if (netlink_list_table(ctx, &cmd->handle) < 0)
return -1;
break;
case CMD_OBJ_SETS: