]> git.ipfire.org Git - thirdparty/iptables.git/commit
extensions: libipt_icmp: Fix confusion between 255/255 and any
authorPhil Sutter <phil@nwl.cc>
Tue, 1 Aug 2023 21:28:20 +0000 (23:28 +0200)
committerPhil Sutter <phil@nwl.cc>
Fri, 4 Aug 2023 13:10:49 +0000 (15:10 +0200)
commit5b5430d627bbc227a2d51d4312c371f2015834c6
treecfb88106484cda558c49b6dda6f4c7f0f86d1775
parent9f98550d58a49fc95d529ebdc0173579d957b425
extensions: libipt_icmp: Fix confusion between 255/255 and any

Per definition, ICMP type "any" is type 255 and the full range of codes
(0-255). Save callback though ignored the actual code values, printing
"any" for every type 255 match. This at least confuses users as they
can't find their rule added as '--icmp-type 255/255' anymore.

It is not entirely clear what the fixed commit was trying to establish,
but the save output is certainly not correct (especially since print
callback gets things right).

Reported-by: Amelia Downs <adowns@vmware.com>
Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1600
Fixes: fc9237da4e845 ("Fix '-p icmp -m icmp' issue (Closes: #37)")
Signed-off-by: Phil Sutter <phil@nwl.cc>
extensions/libipt_icmp.c
extensions/libipt_icmp.t