]> git.ipfire.org Git - thirdparty/iptables.git/commit
arptables: Fix formatting of numeric --h-type output
authorPhil Sutter <phil@nwl.cc>
Wed, 8 Nov 2023 02:58:42 +0000 (03:58 +0100)
committerPhil Sutter <phil@nwl.cc>
Thu, 9 Nov 2023 14:55:16 +0000 (15:55 +0100)
commit59062564de9d4a3a8ed8b2e0010338dc6d2f1408
tree0d99e77ae63a04dc384aa5e72b9f5fea3fa24331
parenta3ae0dc4b34046e0d7893841e86b93c4c010632f
arptables: Fix formatting of numeric --h-type output

Arptables expects numeric arguments to --h-type option in hexadecimal
form, even if no '0x'-prefix is present. In contrast, it prints such
values in decimal. This is not just inconsistent, but makes it
impossible to save and later restore a ruleset without fixing up the
values in between.

Assuming that the parser side can't be changed for compatibility
reasons, fix the output side instead.

This is a day 1 bug and present in legacy arptables as well, so treat
this as a "feature" of arptables-nft and omit a Fixes: tag.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Florian Westphal <fw@strlen.de>
extensions/libarpt_standard.t
iptables/nft-arp.c