From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Fernando Fernandez Mancera <fmancera@suse.de>
Cc: Christoph Anton Mitterer <calestyo@scientia.org>,
netfilter-devel@vger.kernel.org
Subject: Re: bug: nft -n still shows "resolved" values for iif and oif
Date: Thu, 25 Sep 2025 16:07:37 +0200 [thread overview]
Message-ID: <aNVMqSlTNkGFRoPR@calendula> (raw)
In-Reply-To: <e19bafc0-61c9-47af-afb6-15f886cc4d37@suse.de>
On Thu, Sep 25, 2025 at 02:36:15PM +0200, Fernando Fernandez Mancera wrote:
>
>
> On 9/24/25 11:48 PM, Christoph Anton Mitterer wrote:
> > Hey.
> >
> > E.g.:
> > # nft list ruleset
> > table inet filter {
> > chain input {
> > type filter hook input priority filter; policy drop;
> > ct state { established, related } accept
> > iif "eth0" accept
> > }
> > }
> > # nft -n list ruleset
> > table inet filter {
> > chain input {
> > type filter hook input priority 0; policy drop;
> > ct state { 0x2, 0x4 } accept
> > iif "eth0" accept
> > }
> > }
> >
> >
> > IMO especially for iif/oif, which hardcode the iface ID rather than
> > name, it would IMO be rather important to show the real value (that is
> > the ID) and not the resolved one... so that users aren't tricked into
> > some false sense (when they should actually use [io]ifname.
> >
>
> Hi,
>
> AFAICS, the current -n is just a combination of '--numeric-priority
> --numeric-protocol --numeric-time'. Although, the message displayed when
> using --help is misleading.
>
> -n, --numeric Print fully numerical output.
>
> I propose two changes:
>
> 1. Adjust the description when doing --help
> 2. Introduce a new "--numeric-interface" which prevents resolving iif or
> oif.
I wonder if there is a use-case for this.
> Another possible solution could be to use --numeric to do not resolve
> iif/oif but then it would mean we should not resolve ANYTHING as "Print
> fully numerical output." mentions.
>
> What do you think? I can send a patch and test it.
It would good to check if there are more datatypes that are hiding a
number value behind to decide what to do with -n/--numeric.
next prev parent reply other threads:[~2025-09-25 14:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 21:48 bug: nft -n still shows "resolved" values for iif and oif Christoph Anton Mitterer
2025-09-25 12:36 ` Fernando Fernandez Mancera
2025-09-25 14:07 ` Pablo Neira Ayuso [this message]
2025-09-26 10:27 ` Fernando Fernandez Mancera
2025-09-25 15:48 ` Christoph Anton Mitterer
2025-09-25 14:42 ` Florian Westphal
2025-09-25 15:53 ` Christoph Anton Mitterer
2025-09-25 16:45 ` Florian Westphal
2025-09-25 20:44 ` Christoph Anton Mitterer
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=aNVMqSlTNkGFRoPR@calendula \
--to=pablo@netfilter.org \
--cc=calestyo@scientia.org \
--cc=fmancera@suse.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 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.