From aeb84096c8cc413f81829f07ec285c3668d795ec Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Tue, 28 Jul 2009 14:17:41 +0200 Subject: netlink: dump all chains when listing rules Currently only the rules are dumped and chains are constructed based on the rules identities. Dump all chains manually to make sure we also display empty chains. Signed-off-by: Patrick McHardy --- src/rule.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rule.c b/src/rule.c index a5032cf7..3bf48aac 100644 --- a/src/rule.c +++ b/src/rule.c @@ -465,6 +465,9 @@ static int do_command_list(struct netlink_ctx *ctx, struct cmd *cmd) case CMD_OBJ_TABLE: if (do_list_sets(ctx, table) < 0) return -1; + 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; -- cgit v1.2.3