Linux Netfilter development
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Sutter <phil@nwl.cc>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [iptables PATCH] nft: Fix for ruleset flush while restoring
Date: Thu, 13 Aug 2020 04:08:57 +0200	[thread overview]
Message-ID: <20200813020857.GA3256@salvia> (raw)
In-Reply-To: <20200731163125.7309-1-phil@nwl.cc>

On Fri, Jul 31, 2020 at 06:31:25PM +0200, Phil Sutter wrote:
> If ruleset is flushed while an instance of iptables-nft-restore is
> running and has seen a COMMIT line once, it doesn't notice the
> disappeared table while handling the next COMMIT. This is due to table
> existence being tracked via 'initialized' boolean which is only reset
> by nft_table_flush().
> 
> To fix this, drop the dedicated 'initialized' boolean and switch users
> to the recently introduced 'exists' one.
> 
> As a side-effect, this causes base chain existence being checked for
> each command calling nft_xt_builtin_init() as the old 'initialized' bit
> was used to track if that function has been called before or not.
> 
> Signed-off-by: Phil Sutter <phil@nwl.cc>

Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>

      reply	other threads:[~2020-08-13  2:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31 16:31 [iptables PATCH] nft: Fix for ruleset flush while restoring Phil Sutter
2020-08-13  2:08 ` 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=20200813020857.GA3256@salvia \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=phil@nwl.cc \
    /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