]> git.ipfire.org Git - thirdparty/iptables.git/commit
xtables-translate: Leverage stored protocol names
authorPhil Sutter <phil@nwl.cc>
Thu, 29 Feb 2024 16:55:32 +0000 (17:55 +0100)
committerPhil Sutter <phil@nwl.cc>
Thu, 29 Feb 2024 17:07:19 +0000 (18:07 +0100)
commitfcaa99ca9e3c18f831fe523a0ad79fb1da34b0ec
tree0150ec243d5b966ac8b58f6a4aefab45a216f31f
parentbb1a7a5b297aa271f7f59abbcb891cd94d7fb305
xtables-translate: Leverage stored protocol names

Align output of ip(6)tables-translate for --protocol arguments with that
of ip(6)tables -L/-S by calling proto_to_name() from xshared.c. The
latter will consult xtables_chain_protos list first to make sure (the
right) names are used for "common" protocol values and otherwise falls
back to getprotobynumber() which it replaces here.

Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1738
Signed-off-by: Phil Sutter <phil@nwl.cc>
extensions/generic.txlate
iptables/nft-ipv4.c
iptables/nft-ipv6.c
iptables/xshared.c
iptables/xshared.h