diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-04-18 16:28:41 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-04-18 16:38:09 +0200 |
commit | 05ce01fdaf7f657725ce1e5e886813d036b05f25 (patch) | |
tree | 97e965fc9dd6a6b4d7bc301a335ec5e9e45645b9 | |
parent | da24c01b6d94820aee7222aa3c75854ef47bf355 (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 {
}
-rw-r--r-- | src/rule.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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: |