From: Florian Westphal <fw@strlen.de>
To: Phil Sutter <phil@nwl.cc>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Subject: Re: [iptables PATCH 4/4] nft: Delete builtin chains compatibly
Date: Mon, 27 Sep 2021 09:32:25 +0200 [thread overview]
Message-ID: <YVFziSC+mLc/sDTF@strlen.de> (raw)
In-Reply-To: <20210922160632.15635-5-phil@nwl.cc>
Phil Sutter <phil@nwl.cc> wrote:
> Attempting to delete all chains if --delete-chain is called without
> argument has unwanted side-effects especially legacy iptables users are
> not aware of and won't expect:
>
> * Non-default policies are ignored, a previously dropping firewall may
> start accepting traffic.
>
> * The kernel refuses to remove non-empty chains, causing program abort
> even if no user-defined chain exists.
>
> Fix this by requiring a rule cache in that situation and make builtin
> chain deletion depend on its policy and number of rules. Since this may
> change concurrently, check again when having to refresh the transaction.
>
> Also, hide builtin chains from verbose output - their creation is
> implicit, so treat their removal as implicit, too.
>
> When deleting a specific chain, do not allow to skip the job though.
> Otherwise deleting a builtin chain which is still in use will succeed
> although not executed.
Reviewed-by: Florian Westphal <fw@strlen.de>
prev parent reply other threads:[~2021-09-27 7:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-22 16:06 [iptables PATCH 0/4] nft: Fix and improve base chain handling Phil Sutter
2021-09-22 16:06 ` [iptables PATCH 1/4] nft: cache: Avoid double free of unrecognized base-chains Phil Sutter
2021-09-22 16:06 ` [iptables PATCH 2/4] nft: Check base-chain compatibility when adding to cache Phil Sutter
2021-09-22 16:06 ` [iptables PATCH 3/4] nft-chain: Introduce base_slot field Phil Sutter
2021-09-22 16:06 ` [iptables PATCH 4/4] nft: Delete builtin chains compatibly Phil Sutter
2021-09-27 7:32 ` Florian Westphal [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=YVFziSC+mLc/sDTF@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 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.