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 15:59:33 +0200	[thread overview]
Message-ID: <20170927135933.GA27814@salvia> (raw)
In-Reply-To: <20170927131247.GD14971@breakpoint.cc>

On Wed, Sep 27, 2017 at 03:12:47PM +0200, Florian Westphal wrote:
> Florian Westphal <fw@strlen.de> wrote:
> > Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > > 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?
> > 
> > > > -		if (list_member_evaluate(ctx, &i) < 0)
> > > > +		if (evaluate && list_member_evaluate(ctx, &i) < 0)
> > > >  			return -1;
> > 
> > We choke here because payload expressions don't have a base.
> > 
> > Hence this gets supressed in case we evaluate key.
> 
> Ah wait, you are right, its not needed at the moment because we don't have
> 'typeof' keyword yet.
> 
> I'll push the patch without this.

Ah, that explains why, thanks.

Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>

      reply	other threads:[~2017-09-27 13:59 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
2017-09-27 13:02     ` Florian Westphal
2017-09-27 13:12       ` Florian Westphal
2017-09-27 13:59         ` Pablo Neira Ayuso [this message]

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=20170927135933.GA27814@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).