From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Sutter <phil@nwl.cc>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [nf-next PATCH] netfilter: nfnetlink_hook: Dump nat type chains
Date: Fri, 20 Mar 2026 01:24:40 +0100 [thread overview]
Message-ID: <abyTyJBv47f3v9gd@chamomile> (raw)
In-Reply-To: <abxlzn7lymOxWUFa@orbyte.nwl.cc>
On Thu, Mar 19, 2026 at 10:08:30PM +0100, Phil Sutter wrote:
> On Thu, Mar 19, 2026 at 06:06:10PM +0100, Florian Westphal wrote:
> > Phil Sutter <phil@nwl.cc> wrote:
> > > Ah, so the nat-type chain's priority value orders it inside the
> > > dispatcher's list.
> >
> > Yes.
> >
> > > Maybe I should print them below the dispatcher hook with extra
> > > indentation? Maybe extra braces could further clarify, e.g.:
> > >
> > > | hook postrouting {
> > > | +0000000100 nf_nat_ipv6_out [nf_nat] {
> > > | +0000200000 chain inet nat postrouting [nft_chain_nat]
> > > | }
> > > | +2147483647 nf_confirm [nf_conntrack]
> > > | }
> >
> > Actually one could override the hook value with the one of the
> > nat base hook. The ordering inside the dispatcher is whats important,
> > the exact numerical value isn't important.
>
> Hmm. I like how one can use 'list hooks' output to find a good spot for
> a new base chain. The real nat chain priority value is needed for that,
> but no point in considering made up use-cases. Seeing the chains
> attached to a given nat dispatcher is already a step forward, and having
> their ordering is probably well enough.
I guess the goal is to expose iptables and nftables in place?
Is it really needed to expose this internal +0000200000?
Maybe simply report instead?
+0000000100 nf_nat_ipv6_out [nf_nat]: chain ip nat POSTROUTING [iptable_nat]
+0000000100 nf_nat_ipv6_out [nf_nat]: chain inet nat postrouting [nft_chain_nat]
Yes, it looks like a duplicate, but it is sort of how it works now, no
need to expose dispatcher details.
next prev parent reply other threads:[~2026-03-20 0:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 15:32 [nf-next PATCH] netfilter: nfnetlink_hook: Dump nat type chains Phil Sutter
2026-03-19 16:04 ` Florian Westphal
2026-03-19 16:59 ` Phil Sutter
2026-03-19 17:06 ` Florian Westphal
2026-03-19 21:08 ` Phil Sutter
2026-03-20 0:24 ` Pablo Neira Ayuso [this message]
2026-03-20 10:17 ` Phil Sutter
2026-03-20 11:11 ` Phil Sutter
2026-03-20 11:18 ` Florian Westphal
2026-03-20 11:26 ` Phil Sutter
2026-03-20 11:36 ` Phil Sutter
2026-03-20 11:47 ` Florian Westphal
2026-03-20 12:09 ` Pablo Neira Ayuso
2026-03-20 12:27 ` Phil Sutter
2026-03-20 11:45 ` Florian Westphal
2026-03-20 11:46 ` Pablo Neira Ayuso
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=abyTyJBv47f3v9gd@chamomile \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--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