]> 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)
committerfxlb <[email protected]>
Mon, 6 May 2024 19:10:03 +0000 (19:10 +0000)
commit067f7dd17dc39144c4b292a13ceea53610b4b5e0
tree4f25529ea7fe1b677976fd64b942f86a31121204
parente5b1cab0483a5fbb958d453c07aab7307c73fc2b
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.
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]