summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-07-28 14:17:41 +0200
committerPatrick McHardy <kaber@trash.net>2009-07-28 14:17:41 +0200
commitaeb84096c8cc413f81829f07ec285c3668d795ec (patch)
tree991a5d4410b39385dba3ed294ea95b7db606f5de
parent08b4600fc361cbab55ae2f89875df7fddf7b657e (diff)
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 <kaber@trash.net>
-rw-r--r--src/rule.c3
1 files changed, 3 insertions, 0 deletions
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;