netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Florian Westphal <fw@strlen.de>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Subject: Re: [nft PATCH 3/4] xt: Rewrite unsupported compat expression dumping
Date: Thu, 24 Nov 2022 18:22:25 +0100	[thread overview]
Message-ID: <Y3+oUeGrKbcdpntz@orbyte.nwl.cc> (raw)
In-Reply-To: <20221124170454.GG2753@breakpoint.cc>

On Thu, Nov 24, 2022 at 06:04:54PM +0100, Florian Westphal wrote:
> Phil Sutter <phil@nwl.cc> wrote:
> > diff --git a/src/scanner.l b/src/scanner.l
> > index 1371cd044b65a..4edd729c80dab 100644
> > --- a/src/scanner.l
> > +++ b/src/scanner.l
> > @@ -214,6 +214,7 @@ addrstring	({macaddr}|{ip4addr}|{ip6addr})
> >  %s SCANSTATE_TCP
> >  %s SCANSTATE_TYPE
> >  %s SCANSTATE_VLAN
> > +%s SCANSTATE_XT
> >  %s SCANSTATE_CMD_EXPORT
> >  %s SCANSTATE_CMD_IMPORT
> >  %s SCANSTATE_CMD_LIST
> > @@ -799,6 +800,8 @@ addrstring	({macaddr}|{ip4addr}|{ip6addr})
> >  
> >  "secmark"		{ scanner_push_start_cond(yyscanner, SCANSTATE_SECMARK); return SECMARK; }
> >  
> > +"xt"			{ scanner_push_start_cond(yyscanner, SCANSTATE_XT); return XT; }
> 
> Why is there a new scanner state?  It has no tokens, so it doesn't do
> anything.
> 
> Perhaps a leftover?  Or did you plan to make match/target/watcher scoped
> tokens?

We want to accept two arbitrary strings after "xt" and just complain
about the whole thing. Without the scope, something like "xt target
exthdr" will make the parser complain about the unexpected keyword.

Cheers, Phil

  reply	other threads:[~2022-11-24 17:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24 16:56 [nft PATCH 0/4] xt: Rewrite unsupported compat expression dumping Phil Sutter
2022-11-24 16:56 ` [nft PATCH 1/4] xt: Delay libxtables access until translation Phil Sutter
2022-12-08 21:21   ` Pablo Neira Ayuso
2022-12-09  0:14     ` Phil Sutter
2022-12-09 16:06       ` Pablo Neira Ayuso
2022-11-24 16:56 ` [nft PATCH 2/4] xt: Purify enum nft_xt_type Phil Sutter
2022-11-24 16:56 ` [nft PATCH 3/4] xt: Rewrite unsupported compat expression dumping Phil Sutter
2022-11-24 17:04   ` Florian Westphal
2022-11-24 17:22     ` Phil Sutter [this message]
2022-11-24 17:35       ` Florian Westphal
2022-12-09 16:07   ` Pablo Neira Ayuso
2022-12-09 16:45     ` Phil Sutter
2022-12-09 20:10       ` Pablo Neira Ayuso
2022-11-24 16:56 ` [nft PATCH 4/4] xt: Fall back to generic printing from translation Phil Sutter
2022-12-13 14:03 ` [nft PATCH 0/4] xt: Rewrite unsupported compat expression dumping Phil Sutter

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=Y3+oUeGrKbcdpntz@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).