]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
rule: list elements in set in any case
authorEric Leblond <eric@regit.org>
Fri, 31 May 2013 08:50:32 +0000 (10:50 +0200)
committerEric Leblond <eric@regit.org>
Sat, 8 Jun 2013 10:06:22 +0000 (12:06 +0200)
"nft list table" command was not displaying the elements of named
set. This was thus not possible to restore a ruleset by using the
listing output. This patch modifies the code to display the elements
of set in all cases.

src/rule.c

index e77323d87b0d2ec618257e544c1c2395d6811abe..e7627a7ea826c438d7bb0c6a1bbbb1897b00c92e 100644 (file)
@@ -466,8 +466,7 @@ static int do_list_sets(struct netlink_ctx *ctx, const struct location *loc,
                return -1;
 
        list_for_each_entry_safe(set, nset, &ctx->list, list) {
-               if (set->flags & SET_F_ANONYMOUS &&
-                   netlink_get_setelems(ctx, &set->handle, loc, set) < 0)
+               if (netlink_get_setelems(ctx, &set->handle, loc, set) < 0)
                        return -1;
                list_move_tail(&set->list, &table->sets);
        }