]> git.ipfire.org Git - thirdparty/nftables.git/commit
netlink_delinearize: add missing icmp id/sequence support
authorFlorian Westphal <fw@strlen.de>
Tue, 15 Jun 2021 16:01:49 +0000 (18:01 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 16 Jun 2021 23:12:46 +0000 (01:12 +0200)
commit9a5574e2d4e9c9cb5d6382be03a7eccfa8663a15
tree1034daf5753e31bb01d01099ebeea9ee318b2f4d
parentb4060b2e5649d920ee40b27038a89569cf9e0f85
netlink_delinearize: add missing icmp id/sequence support

Pablo reports following input and output:
in: icmpv6 id 1
out: icmpv6 type { echo-request, echo-reply } icmpv6 parameter-problem 65536/16

Reason is that icmp fields overlap, decoding of the correct name requires
check of the icmpv6 type.  This only works for equality tests, for
instance

in: icmpv6 type echo-request icmpv6 id 1
will be listed as "icmpv6 id 1" (which is not correct either, since the
input only matches on echo-request).

with this patch, output of 'icmpv6 id 1' is
icmpv6 type { echo-request, echo-reply } icmpv6 id 1

The second problem, the removal of a single check (request OR reply),
is resolved in the followup patch.

Signed-off-by: Florian Westphal <fw@strlen.de>
src/netlink_delinearize.c