]> git.ipfire.org Git - thirdparty/iptables.git/commit
arptables: Fix --proto-type mask formatting
authorPhil Sutter <phil@nwl.cc>
Wed, 8 Nov 2023 03:08:44 +0000 (04:08 +0100)
committerPhil Sutter <phil@nwl.cc>
Thu, 9 Nov 2023 14:55:30 +0000 (15:55 +0100)
commit2eb823b520e1503cd3fbc2c66b8bc50beadac6b0
tree9ba3ba910c1d07fac5aa645dd02ab9077058b188
parent59062564de9d4a3a8ed8b2e0010338dc6d2f1408
arptables: Fix --proto-type mask formatting

Arptables accepts numeric --proto-type values and masks in any numeral
system identified by (absence of) prefix. Yet it prints the mask value
in hex without '0x'-prefix, breaking save and restore the same way
numeric --h-type output did.

In theory, this could be fixed either by adding the missing prefix or
printing the mask in decimal (like most other builtin matches do), but
since the value is printed in hex with prefix already, align mask output
with that.

Also a day 1 bug and consistent with legacy, so no Fixes: tag here as
well.

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