All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 2/3] evaluate: allow to use string with binary operations
Date: Wed, 15 Jan 2014 16:58:49 +0100	[thread overview]
Message-ID: <20140115155849.GA1506@localhost> (raw)
In-Reply-To: <20140115092943.GA4566@localhost>

On Wed, Jan 15, 2014 at 10:29:43AM +0100, Pablo Neira Ayuso wrote:
> On Tue, Jan 14, 2014 at 03:49:00PM +0000, Patrick McHardy wrote:
> > Well, I think the easiest approach would be to add some code to
> > expr_evaluate_relational() for OP_EQ for convert the LHS of a
> > relational meta expression to LHS & RHS:
> > 
> >      relational (==)
> >     /               \
> > meta oifname       string
> > 
> > =>
> > 
> >         relational (==)
> >        /               \
> >     binop (&)        string
> >   /          \
> > meta oifname  string
> > 
> > The attached patch uses '*' as a trigger (and obviously won't work
> > because the '*' is also used in the mask, but you get the idea.
> > netlink_delinarize adjustments are missing, but it should be pretty
> > trivial to add the corresponding code to postprocessing of relational
> > expressions.
> 
> Oh yes, with that wildcard trick the thing is simplified. There was
> some discuss on the use of '+' that seems to be possible to be used in
> a device name. I guess '*' is safe as udev is using it in their rules.

It seems we need to include the '*' into the string rule in flex for
this. We already have a single '*' that is used in the parser for
prefixes, I think that may lead to ambiguity problems.

  reply	other threads:[~2014-01-15 15:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 11:30 [PATCH 0/3 nft] [RFC] more syntax changes Pablo Neira Ayuso
2014-01-14 11:30 ` [PATCH 1/3] scanner: replace binary characters '&' '|' and '!' by their names Pablo Neira Ayuso
2014-01-14 12:00   ` Pablo Neira Ayuso
2014-01-14 12:24     ` Patrick McHardy
2014-01-14 12:21   ` Patrick McHardy
2014-01-14 11:30 ` [PATCH 2/3] evaluate: allow to use string with binary operations Pablo Neira Ayuso
2014-01-14 12:22   ` Patrick McHardy
2014-01-14 15:25     ` Pablo Neira Ayuso
2014-01-14 15:49       ` Patrick McHardy
2014-01-15  9:29         ` Pablo Neira Ayuso
2014-01-15 15:58           ` Pablo Neira Ayuso [this message]
2014-01-15 16:05             ` Patrick McHardy
2014-01-14 11:30 ` [PATCH 3/3] scanner: rename address selector from 'eth' to 'ether' Pablo Neira Ayuso
2014-01-14 12:23   ` Patrick McHardy
2014-01-14 11:47 ` [PATCH 0/3 nft] [RFC] more syntax changes Arturo Borrero Gonzalez

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=20140115155849.GA1506@localhost \
    --to=pablo@netfilter.org \
    --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 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.