All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [nft PATCH 2/4] rule: when listing all sets, don't print empty tables
Date: Tue, 5 Jan 2016 12:35:44 +0100	[thread overview]
Message-ID: <20160105113544.GA9098@salvia> (raw)
In-Reply-To: <145190991185.22285.13328538132434564559.stgit@r2d2.cica.es>

On Mon, Jan 04, 2016 at 01:18:31PM +0100, Arturo Borrero Gonzalez wrote:
> diff --git a/src/rule.c b/src/rule.c
> index 18ff592..c0e45aa 100644
> --- a/src/rule.c
> +++ b/src/rule.c
> @@ -1009,12 +1009,24 @@ static int do_list_sets(struct netlink_ctx *ctx, struct cmd *cmd)
>  	};
>  	struct table *table;
>  	struct set *set;
> +	bool printable_sets = false;
>  
>  	list_for_each_entry(table, &table_list, list) {
>  		if (cmd->handle.family != NFPROTO_UNSPEC &&
>  		    cmd->handle.family != table->handle.family)
>  			continue;
>  
> +		/* if there are no printable sets, don't print empty table */
> +		list_for_each_entry(set, &table->sets, list) {
> +			if (!set->flags & SET_F_ANONYMOUS) {

Wait, this should be:

        if (!(set->flags & SET_F_ANONYMOUS))

instead.

I'm fixing this here.

  parent reply	other threads:[~2016-01-05 11:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04 12:18 [nft PATCH 1/4] rule: don't list anonymous sets Arturo Borrero Gonzalez
2016-01-04 12:18 ` [nft PATCH 2/4] rule: when listing all sets, don't print empty tables Arturo Borrero Gonzalez
2016-01-05 11:19   ` Pablo Neira Ayuso
2016-01-05 11:35   ` Pablo Neira Ayuso [this message]
2016-01-05 11:40     ` Pablo Neira Ayuso
2016-01-05 12:10       ` Arturo Borrero Gonzalez
2016-01-04 12:18 ` [nft PATCH 3/4] rule: delete extra space in sets printing Arturo Borrero Gonzalez
2016-01-05 11:28   ` Pablo Neira Ayuso
2016-01-05 11:35     ` Arturo Borrero Gonzalez
2016-01-04 12:18 ` [nft PATCH 4/4] tests/operations: add some listing tests Arturo Borrero Gonzalez
2016-01-05 12:12   ` Arturo Borrero Gonzalez
2016-01-05 11:19 ` [nft PATCH 1/4] rule: don't list anonymous sets Pablo Neira Ayuso

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=20160105113544.GA9098@salvia \
    --to=pablo@netfilter.org \
    --cc=arturo.borrero.glez@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.