]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
src: restore nft list tables
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 3 Aug 2015 16:04:43 +0000 (18:04 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 3 Aug 2015 16:07:30 +0000 (18:07 +0200)
Iterate over the ctx->list which is where the table objects are after
calling netlink_list_tables().

Fixes: e4d21958c835 ("rule: add do_list_tables()")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/rule.c

index 1e712a554959f6cc2b055f75474b2332c7e15e99..09d1ffd45e354928a0681442eafbc17b524b5edb 100644 (file)
@@ -907,7 +907,7 @@ static int do_list_tables(struct netlink_ctx *ctx, struct cmd *cmd)
        if (netlink_list_tables(ctx, &cmd->handle, &cmd->location) < 0)
                return -1;
 
-       list_for_each_entry(table, &table_list, list)
+       list_for_each_entry(table, &ctx->list, list)
                printf("table %s %s\n",
                       family2str(table->handle.family),
                       table->handle.table);