]> 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:32 +0000 (00:17 +0000)
committerguy <guy>
Wed, 19 Nov 2003 00:17:32 +0000 (00:17 +0000)
commitd6cf0925b293eb8c9aab22ffc7255f343885a8c6
tree4e34cc8b227ecdddf712b5fe64e7f4fb34b2cb2c
parent8a42f11ab081f263d58a2ca752c122848a4b147a
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