From 05ce01fdaf7f657725ce1e5e886813d036b05f25 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 18 Apr 2013 16:28:41 +0200 Subject: 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 { } --- src/rule.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/rule.c') 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: -- cgit v1.2.3