netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft 2/2] src: store expression as set key instead of data type
Date: Wed, 27 Sep 2017 14:58:38 +0200	[thread overview]
Message-ID: <20170927125838.GA26528@salvia> (raw)
In-Reply-To: <20170919124954.26852-3-fw@strlen.de>

On Tue, Sep 19, 2017 at 02:49:54PM +0200, Florian Westphal wrote:
> @@ -1023,7 +1036,8 @@ static int list_member_evaluate(struct eval_ctx *ctx, struct expr **expr)
>  	return err;
>  }
>  
> -static int expr_evaluate_concat(struct eval_ctx *ctx, struct expr **expr)
> +static int expr_evaluate_concat(struct eval_ctx *ctx, struct expr **expr,
> +				bool evaluate)

Hm, why this boolean as parameter?

>  {
>  	const struct datatype *dtype = ctx->ectx.dtype, *tmp;
>  	uint32_t type = dtype ? dtype->type : 0, ntype = 0;
> @@ -1044,7 +1058,7 @@ static int expr_evaluate_concat(struct eval_ctx *ctx, struct expr **expr)
>  			tmp = concat_subtype_lookup(type, --off);
>  		expr_set_context(&ctx->ectx, tmp, tmp->size);
>  
> -		if (list_member_evaluate(ctx, &i) < 0)
> +		if (evaluate && list_member_evaluate(ctx, &i) < 0)
>  			return -1;
>  		flags &= i->flags;
>  

  reply	other threads:[~2017-09-27 12:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 12:49 [PATCH nft 0/2] store expression instead of data type as set key Florian Westphal
2017-09-19 12:49 ` [PATCH nft 1/2] evaluate: prepare to store expr key rather than datatype Florian Westphal
2017-09-27 12:19   ` Pablo Neira Ayuso
2017-09-19 12:49 ` [PATCH nft 2/2] src: store expression as set key instead of data type Florian Westphal
2017-09-27 12:58   ` Pablo Neira Ayuso [this message]
2017-09-27 13:02     ` Florian Westphal
2017-09-27 13:12       ` Florian Westphal
2017-09-27 13:59         ` 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=20170927125838.GA26528@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --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).