netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Giuseppe Longo <giuseppelng@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [xtables-arptables PATCH v2 2/5] nft: search builtin tables via nft_handle tables pointer
Date: Wed, 24 Jul 2013 10:51:18 +0200	[thread overview]
Message-ID: <20130724085118.GB16434@localhost> (raw)
In-Reply-To: <20130723161226.10040.34058.stgit@localhost>

On Tue, Jul 23, 2013 at 06:12:29PM +0200, Giuseppe Longo wrote:
>

Again missing description.

>
> Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
> ---
>  iptables/nft.c |   13 +++++++------
>  1 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/iptables/nft.c b/iptables/nft.c
> index f6dccff..07ca0f1 100644
> --- a/iptables/nft.c
> +++ b/iptables/nft.c
> @@ -288,20 +288,21 @@ nft_chain_builtin_add(struct nft_handle *h, struct builtin_table *table,
>  }
>  
>  /* find if built-in table already exists */
> -static struct builtin_table *nft_table_builtin_find(const char *table)
> +static struct builtin_table *
> +nft_table_builtin_find(struct nft_handle *h, const char *table)
>  {
>  	int i;
>  	bool found = false;
>  
>  	for (i=0; i<TABLES_MAX; i++) {
> -		if (strcmp(tables[i].name, table) != 0)
> +		if (strcmp(h->tables[i].name, table) != 0)
>  			continue;
>  
>  		found = true;
>  		break;
>  	}
>  
> -	return found ? &tables[i] : NULL;
> +	return found ? &h->tables[i] : NULL;
>  }
>  
>  /* find if built-in chain already exists */
> @@ -349,7 +350,7 @@ nft_chain_builtin_init(struct nft_handle *h, const char *table,
>  	int ret = 0;
>  	struct builtin_table *t;
>  
> -	t = nft_table_builtin_find(table);
> +	t = nft_table_builtin_find(h, table);
>  	if (t == NULL) {
>  		ret = -1;
>  		goto out;
> @@ -424,7 +425,7 @@ int nft_table_set_dormant(struct nft_handle *h, const char *table)
>  	int ret = 0, i;
>  	struct builtin_table *t;
>  
> -	t = nft_table_builtin_find(table);
> +	t = nft_table_builtin_find(h, table);
>  	if (t == NULL) {
>  		ret = -1;
>  		goto out;
> @@ -485,7 +486,7 @@ __nft_chain_set(struct nft_handle *h, const char *table,
>  	struct builtin_chain *_c;
>  	int ret;
>  
> -	_t = nft_table_builtin_find(table);
> +	_t = nft_table_builtin_find(h, table);
>  	/* if this built-in table does not exists, create it */
>  	if (_t != NULL)
>  		nft_table_builtin_add(h, _t, false);
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-07-24  8:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 16:11 [xtables-arptables PATCH v2 0/5] nft changes for xtables-arptables Giuseppe Longo
2013-07-23 16:12 ` [xtables-arptables PATCH v2 1/5] nft: add builtin_table pointer Giuseppe Longo
2013-07-24  8:50   ` Pablo Neira Ayuso
2013-07-23 16:12 ` [xtables-arptables PATCH v2 2/5] nft: search builtin tables via nft_handle tables pointer Giuseppe Longo
2013-07-24  8:51   ` Pablo Neira Ayuso [this message]
2013-07-23 16:12 ` [xtables-arptables PATCH v2 3/5] nft: nft_xtables_config_load() called only in nft_init() Giuseppe Longo
2013-07-24  8:56   ` Pablo Neira Ayuso
2013-07-24  9:36     ` Tomasz Bursztyka
2013-07-24 10:56       ` Pablo Neira Ayuso
2013-07-24 11:14         ` Tomasz Bursztyka
2013-07-24 11:55           ` Pablo Neira Ayuso
2013-07-24  9:01   ` Pablo Neira Ayuso
2013-07-23 16:12 ` [xtables-arptables PATCH v2 4/5] nft: make functions public Giuseppe Longo
2013-07-23 16:13 ` [xtables-arptables PATCH v2 5/5] nft: replace args.family Giuseppe Longo
2013-07-24  8:58   ` Pablo Neira Ayuso
2013-07-24  9:40     ` Tomasz Bursztyka
2013-07-23 16:16 ` [xtables-arptables PATCH v2 0/5] nft changes for xtables-arptables Tomasz Bursztyka

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=20130724085118.GB16434@localhost \
    --to=pablo@netfilter.org \
    --cc=giuseppelng@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 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).