Change ICMPv6 checksum calculation to use IP_Hdr wrapper.

So that src/dst addresses used in pseudo-header are correct when
there's certain extension headers (routing/destination).

Add ICMP/ICMPv6 checksum unit tests.
This commit is contained in:
Jon Siwek 2012-04-10 11:37:08 -05:00
parent 958c6c7cf4
commit 27ba3118c1
12 changed files with 19 additions and 7 deletions

View file

@ -62,7 +62,7 @@ void ICMP_Analyzer::DeliverPacket(int len, const u_char* data,
break;
case IPPROTO_ICMPV6:
chksum = icmp6_checksum(icmpp, ip->IP6_Hdr(), len);
chksum = icmp6_checksum(icmpp, ip, len);
break;
default: