From: Eric Leblond Date: Fri, 31 May 2013 08:50:32 +0000 (+0200) Subject: rule: list elements in set in any case X-Git-Tag: v0.099~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c7d313751d34e0e83be82d7b0e74b5bdf2364d1;p=thirdparty%2Fnftables.git rule: list elements in set in any case "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. --- diff --git a/src/rule.c b/src/rule.c index e77323d8..e7627a7e 100644 --- a/src/rule.c +++ b/src/rule.c @@ -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); }