Linux Netfilter development
 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: [RFC PATCH nft] parser: re-try unexpected tokens as symbol expression
Date: Wed, 30 Dec 2015 00:42:34 +0100	[thread overview]
Message-ID: <20151229234234.GA1386@salvia> (raw)
In-Reply-To: <1451425319-11715-1-git-send-email-fw@strlen.de>

On Tue, Dec 29, 2015 at 10:41:59PM +0100, Florian Westphal wrote:
> nft fails to parse certain corner-cases, for example:
> 
> nft add rule filter input meta rtclassid daddr
> 
> ... as it finds DADDR token.  However, 'daddr' might be a valid
> routing realm listed in iproute2/rt_realms, so this should be allowed.

We should probably have a look at lex "start conditions" [1]. I think
it's possible to disable scanner rules from the parser based on our
context via yy_push_state(), thus the scanner rules are
enabled/disabled. With the patchset I have just posted, we know have a
rule for specific constant rhs of the relational.

[1] https://www.freebsd.org/cgi/man.cgi?query=lex&sektion=1

      reply	other threads:[~2015-12-29 23:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-29 21:41 [RFC PATCH nft] parser: re-try unexpected tokens as symbol expression Florian Westphal
2015-12-29 23:42 ` 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=20151229234234.GA1386@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