Re: [nft PATCH v2] parser_bison: Accept arbitrary user-defined names by quoting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pablo,

On Fri, Jun 28, 2019 at 08:00:51PM +0200, Pablo Neira Ayuso wrote:
> On Mon, Jun 24, 2019 at 06:36:08PM +0200, Phil Sutter wrote:
> > Parser already allows to quote user-defined strings in some places to
> > avoid clashing with defined keywords, but not everywhere. Extend this
> > support further and add a test case for it.
> > 
> > Signed-off-by: Phil Sutter <phil@xxxxxx>
> > ---
> > Changes since v1:
> > - Fix testcase, I forgot to commit adjustments done to it.
> > 
> > Note: This is a reduced variant of "src: Quote user-defined names" sent
> >       back in January. Discussion was not conclusive regarding whether
> >       to quote these names on output or not, but I assume allowing for
> >       users to specify them by adding quotes is a step forward without
> >       drawbacks.
> 
> So this will fail later on, right?
> 
>         nft list ruleset > file.nft
>         nft -f file.nft

Yes, that's right. I sent a complete version which does the necessary
quoting on output in January[1], but discussion wasn't conclusive. You
had a different approach which accepts the quotes as part of the name
but you weren't happy with it, either. I *think* you wanted to search
for ways to solve this from within bison but we never got back to it
anymore.

This simplified patch is merely trying to make things consistent
regarding user-defined names. IIRC, I can already have an interface
named "month", use that in a netdev family chain declaration (quoted)
and 'nft list ruleset' will print it unquoted, so it can't be applied
anymore. Without my patch, it is simply impossible to use certain
recognized keywords as names for tables, chains, etc., even if one
accepted the implications it has.

Cheers, Phil

[1] Message-Id: <20190116184613.31698-1-phil@xxxxxx>



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux