tcpdump/tests/icmp-rfc5837.pcap
Francois-Xavier Le Bail f30baa4292 ICMP: Fix printing the Interface Name Sub-Object
RFC 5837 - 4.3.  Interface Name Sub-Object
"The Interface Name Sub-Object MUST have a length that is a multiple
 of 4 octets and MUST NOT exceed 64 octets.

 The Length field represents the length of the Interface Name Sub-
 Object, including the length and the interface name in octets."

The length of the interface name to print is: (Length field) - 1.
The offset is only: Length field

Add sanity checks: Multiple of 4 octets, <= 64 octets.

Fix the icmp-rfc5837.pcap test.
The interface name length in octets is 63, thus the length field must be 64.
Update also the ICMP Multi-Part Extensions checksum.

Keep an invalid length field in icmp-cksum-oobr-2.pcap.

Update the output of two tests accordingly.
2022-02-07 19:02:48 +01:00

284 B