All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Quentin Deslandes <qde@naccy.de>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Subject: Re: [nft PATCH 2/2] Add support for table's persist flag
Date: Tue, 26 Mar 2024 14:21:10 +0100	[thread overview]
Message-ID: <ZgLLxn9LZp8xhmSP@orbyte.nwl.cc> (raw)
In-Reply-To: <f3f6acf4-1f20-4571-b452-85c5d0299a21@naccy.de>

On Mon, Mar 25, 2024 at 02:33:48PM +0100, Quentin Deslandes wrote:
> On 2024-03-22 16:48, Phil Sutter wrote:
[...]
> > diff --git a/src/parser_bison.y b/src/parser_bison.y
> > index bdb73911759c8..1ade7417f8d6a 100644
> > --- a/src/parser_bison.y
> > +++ b/src/parser_bison.y
[...]
> > @@ -1930,6 +1921,31 @@ table_options		:	FLAGS		STRING
> >  			}
> >  			;
> >  
> > +table_flags		:	table_flag
> > +			|	table_flags	COMMA	table_flag
> > +			{
> > +				$$ = $1 | $3;
> > +			}
> > +			;
> > +table_flag		:	STRING
> > +			{
> > +				if (strcmp($1, "dormant") == 0) {
> > +					$$ = TABLE_F_DORMANT;
> > +					free_const($1);
> > +				} else if (strcmp($1, "owner") == 0) {
> > +					$$ = TABLE_F_OWNER;
> 
> Don't you need to free_const($1) here too?

Oh yes, thanks for spotting it! Guess I messed up some c'n'p here, the
code is really obvious.

Thanks, Phil

      reply	other threads:[~2024-03-26 13:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 15:48 [nft PATCH 0/2] Add support for table's persist flag Phil Sutter
2024-03-22 15:48 ` [nft PATCH 1/2] doc: nft.8: Two minor synopsis fixups Phil Sutter
2024-03-22 15:48 ` [nft PATCH 2/2] Add support for table's persist flag Phil Sutter
2024-03-25 13:33   ` Quentin Deslandes
2024-03-26 13:21     ` Phil Sutter [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=ZgLLxn9LZp8xhmSP@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=qde@naccy.de \
    /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.