netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: Netfilter Development Mailing list
	<netfilter-devel@vger.kernel.org>,
	Patrick McHardy <kaber@trash.net>
Subject: Re: [nft PATCH 3/3 v2] src: add list ruleset command
Date: Thu, 25 Sep 2014 19:21:33 +0200	[thread overview]
Message-ID: <20140925172133.GA14121@salvia> (raw)
In-Reply-To: <CAOkSjBjRPH3hDJrVY5YPn0Db8vQgPZxdnHoPhrHHW90wjvz0vQ@mail.gmail.com>

On Wed, Sep 24, 2014 at 04:54:10PM +0200, Arturo Borrero Gonzalez wrote:
> On 24 September 2014 12:32, Arturo Borrero Gonzalez
> <arturo.borrero.glez@gmail.com> wrote:
> > This patch adds a new command to nft:
> >         % nft list ruleset [family]
> >
> 
> Hi,
> 
> this patch requires further review and tuning.
> 
> When using the interactive mode there are weird behaviours I need to
> investigate.
> Any pointer will be appreciated.

static LIST_HEAD(table_list);

void table_add_hash(struct table *table)
{
        list_add_tail(&table->list, &table_list);
}

+static int do_list_ruleset(struct netlink_ctx *ctx, struct cmd *cmd)
+{
+       struct table *table, *next;
+       LIST_HEAD(table_list);
        ^------------------^

I think we have to select a different name for this variable that is
allocated in the stack, since we already have a global table_list.

  reply	other threads:[~2014-09-25 17:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 10:32 [nft PATCH 1/3] rule: rename do_command_list_cleanup() to table_cleanup() Arturo Borrero Gonzalez
2014-09-24 10:32 ` [nft PATCH 2/3 v2] rule: factorize chain and table listing code Arturo Borrero Gonzalez
2014-09-24 10:32 ` [nft PATCH 3/3 v2] src: add list ruleset command Arturo Borrero Gonzalez
2014-09-24 14:54   ` Arturo Borrero Gonzalez
2014-09-25 17:21     ` Pablo Neira Ayuso [this message]
2014-09-29 10:38 ` [nft PATCH 1/3] rule: rename do_command_list_cleanup() to table_cleanup() 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=20140925172133.GA14121@salvia \
    --to=pablo@netfilter.org \
    --cc=arturo.borrero.glez@gmail.com \
    --cc=kaber@trash.net \
    --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).