]> The Tcpdump Group git mirrors - tcpdump/commit
frag6: Fix invalid 32-bit versus 64-bit printouts
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 6 May 2024 09:20:27 +0000 (11:20 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 7 May 2024 19:20:16 +0000 (21:20 +0200)
commit4966c764d28afc1cc99a4565946e356d19ce0635
treed0d6c2c500bad71e827635da2178e2d5890eb4b7
parentefe1c57558e542eca80dca2ca63f9e979155efe2
frag6: Fix invalid 32-bit versus 64-bit printouts

Print "[length < 0] (invalid)" when fragment length is negative.

In this case, e.g. when IPv6 payload length is zero, the 32-bit and
64-bit printouts were different.

Example:
32-bit:
frag (0x80000074:1280|4294967288)
---
64-bit:
frag (0x80000074:1280|18446744073709551608)

Add a test file.

(cherry picked from commit 067f7dd17dc39144c4b292a13ceea53610b4b5e0)
print-frag6.c
tests/TESTLIST
tests/ipv6_frag6_negative_len.out [new file with mode: 0644]
tests/ipv6_frag6_negative_len.pcap [new file with mode: 0644]