[Bug 1729] New: iptables list shows proto column with numeric instead of protocol name

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Tue Jan 2 12:53:16 CET 2024


https://bugzilla.netfilter.org/show_bug.cgi?id=1729

            Bug ID: 1729
           Summary: iptables list shows proto column with numeric instead
                    of protocol name
           Product: iptables
           Version: 1.8.x
          Hardware: x86_64
                OS: Fedora
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: iptables
          Assignee: netfilter-buglog at lists.netfilter.org
          Reporter: btanastasov at yahoo.co.uk

Hello,

Couple of days ago I found that on Fedora 39 there is a change in output of:

iptables -L -vn

I'm using those options for many years ... more than 20 or so on many computers
with
older/or stable versions, but on my desktop which I upgrade regularly I don't
run it very
often, because the config is the same all the time. I just upgrade the machine
and the
firewall script I have is started at boot. I managed to find that the change
I'm writing
to you is made around update iptables between 1.8.8 and 1.8.9.

This is the commit:


author    Phil Sutter <phil at nwl.cc>    2022-07-28 12:31:36 +0200
committer    Phil Sutter <phil at nwl.cc>    2022-07-29 11:53:54 +0200
commit    da8ecc62dd765b15df84c3aa6b83dcb7a81d4ffa (patch)
tree    1f1f4503f9bf6d600fa0fa9921a160af3f45b2e7
parent    ba98dc47073b46c3a514039baaddcebecb4e738d (diff)
xshared: Print protocol numbers if --numeric was given
This is much trickier than expected: On one hand, proto_to_name() is
used to lookup protocol extensions so must resolve despite FMT_NUMERIC
being set. On the other, --verbose implies --numeric but changing the
output there is probably a bad idea. Luckily the latter situation is
identified by FMT_NOTABLE bit.

Signed-off-by: Phil Sutter <phil at nwl.cc>


This is backported in Fedora 38 too (iptables is the same version 1.8.9).
With this commit the output of iptables -L -vn (--numeric included) is changed.
Now the
proto column shows numeric 0, 6,17, etc., instead of protocol name: tcp, udp,
all etc.,
compared to all previous versions. Without -n output is very slow, because of
DNS
resolving. I think it is useful to revert this change, because as is with
column "target"
it is more descriptive.
  I didn't find option to change the proto column to name, so I'm writing to
you.

Regars,
Boyan Anastasow

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20240102/f3295e3f/attachment.html>


More information about the netfilter-buglog mailing list