]> The Tcpdump Group git mirrors - tcpdump/commit
Cut off "snapend" at the length of the IPv4 or IPv6 payload, so we don't
authorguy <guy>
Wed, 19 Nov 2003 00:17:01 +0000 (00:17 +0000)
committerguy <guy>
Wed, 19 Nov 2003 00:17:01 +0000 (00:17 +0000)
commitf05470254c5b669c23a7b3384cb7ef103702ddb2
tree26e7244184ebe139cc687a4eeeb2729a529df08e
parent62235fc6eb01e91c960964c359a2049054ff8bcc
Cut off "snapend" at the length of the IPv4 or IPv6 payload, so we don't
run past the end of that payload.

Check that the IPv4 total length isn't less than the header length.

Use "%u", not "%d", to print unsigned values.

Properly update "len" in the header-processing loop for IPv6.

Doing so means we can trust the length passed to the TCP and UDP
dissectors when constructing the IPv6 pseudo-header; do so (but fix the
length we pass to the UDP-over-IPv6 checksum routine).

That length is unsigned; make the corresponding arguments to the TCP and
UDP checksum routines unsigned.
print-ip.c
print-ip6.c
print-tcp.c
print-udp.c