From: Eric Leblond <eric@regit.org>
To: netfilter-devel@vger.kernel.org
Cc: Eric Leblond <eric@regit.org>
Subject: [nftables PATCH 3/5] rule: list elements in set in any case
Date: Sun, 2 Jun 2013 12:38:30 +0200 [thread overview]
Message-ID: <1370169512-23500-4-git-send-email-eric@regit.org> (raw)
In-Reply-To: <1370169512-23500-1-git-send-email-eric@regit.org>
"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.
Signed-off-by: Eric Leblond <eric@regit.org>
---
src/rule.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/rule.c b/src/rule.c
index e77323d..e7627a7 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);
}
--
1.7.10.4
next prev parent reply other threads:[~2013-06-02 10:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-02 10:38 [nftables PATCH 0/5] misc fixes Eric Leblond
2013-06-02 10:38 ` [nftables PATCH 1/5] doc: fix inversion of operator and object Eric Leblond
2013-06-02 10:38 ` [nftables PATCH 2/5] expression: don't free TYPE_INVALID datatype Eric Leblond
2013-06-02 10:38 ` Eric Leblond [this message]
2013-06-02 10:38 ` [nftables PATCH 4/5] cli: add quit command Eric Leblond
2013-06-02 10:38 ` [nftables PATCH 5/5] cli: reset terminal when CTRL+d is pressed Eric Leblond
2013-06-06 11:43 ` [nftables PATCH 0/5] misc fixes Pablo Neira Ayuso
2013-06-06 12:02 ` Pablo Neira Ayuso
2013-06-08 10:12 ` Eric Leblond
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1370169512-23500-4-git-send-email-eric@regit.org \
--to=eric@regit.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).