]> The Tcpdump Group git mirrors - tcpdump/commit
Go with Wireshark's Internet checksum routine.
authorGuy Harris <[email protected]>
Mon, 13 Jun 2011 21:08:51 +0000 (14:08 -0700)
committerGuy Harris <[email protected]>
Mon, 13 Jun 2011 21:08:51 +0000 (14:08 -0700)
commit94a4b4608009a96bf791ff24b2d019f40a120085
tree41899d9a56ee613b9d6b754401bdb2de36c9fee8
parent26d81cbe26f0dd73e32ea615b2576dfdca71cfb7
Go with Wireshark's Internet checksum routine.

The Wireshark routine is based on the BSD in-kernel portable checksum
routine (thus BSD-licensed); it takes a vector of pointers and lengths
and checksums the concatenation of the buffers in question (just as the
BSD in-kernel routine checksums a chain of mbufs).

This simplifies the "with a pseudo-header" checksums; hopefully it'll
fix up the problems being seen on some big-endian platforms, which might
be due to hand-calculating some or all of the checksum and doing so
incorrectly.  It also gets rid of some code that might be dereferencing
unaligned pointers.
15 files changed:
Makefile.in
in_cksum.c [new file with mode: 0644]
interface.h
ip6.h
netdissect.h
print-dccp.c
print-icmp.c
print-igmp.c
print-ip.c
print-ip6.c
print-mobile.c
print-pim.c
print-tcp.c
print-udp.c
print-vrrp.c