netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Jan Engelhardt <jengelh@inai.de>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH iptabes-nft] iptables-nft: allow removal of empty builtin chains
Date: Sat, 14 Aug 2021 22:53:14 +0200	[thread overview]
Message-ID: <20210814205314.GF607@breakpoint.cc> (raw)
In-Reply-To: <84q02320-o5pp-8q8q-q646-473ssq92n552@vanv.qr>

Jan Engelhardt <jengelh@inai.de> wrote:
> 
> On Saturday 2021-08-14 19:46, Florian Westphal wrote:
> > Conservative change:
> > iptables-nft -X will not remove empty builtin chains.
> > OTOH, maybe it would be better to auto-remove those too, if empty.
> > Comments?
> 
> How are chain policies expressed in nft, as a property on the
> chain (like legacy), or as a separate rule?
> That is significant when removing "empty" chains.

Indeed.  Since this removes the base chain, it implicitly reverts
a DROP policy too.

I wish that iptables-nft would do drop policy by DROP rule (then the
deletion would fail), but it does not.

As it stands, the only way to get rid of an iptables-nft added table
is via nft.  For -legacy its not even possible unless you can rmmod
the module, which is not always possible.

Sucks.  Any suggestions/idea?

  reply	other threads:[~2021-08-14 20:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-14 17:46 [PATCH iptabes-nft] iptables-nft: allow removal of empty builtin chains Florian Westphal
2021-08-14 20:18 ` Jan Engelhardt
2021-08-14 20:53   ` Florian Westphal [this message]
2021-08-15 13:12     ` Pablo Neira Ayuso
2021-08-15 13:27       ` Florian Westphal
2021-08-15 13:49         ` Pablo Neira Ayuso
2021-08-15 14:14           ` Florian Westphal
2021-08-15 14:27             ` Pablo Neira Ayuso
2021-08-15 14:36               ` Florian Westphal
2021-09-13 15:46               ` Phil Sutter
2021-09-13 16:02                 ` Florian Westphal

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=20210814205314.GF607@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=jengelh@inai.de \
    --cc=netfilter-devel@vger.kernel.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).