IPv6 doesn't have a checksum field. This code previously zeroed the
space in the header where the IPv4 header checksum would be, regardless
of IP header version.
*dst=htonl(ipo.obf4(*dst));
else
*src=htonl(ipo.obf4(*src));
+
+ pr.d_ip->ip_sum=0;
} else if (pr.d_ip->ip_v == 6) {
uint64_t *src=1+(uint64_t*)&pr.d_ip6->ip6_src;
uint64_t *dst=1+(uint64_t*)&pr.d_ip6->ip6_dst;
else
*src=ipo.obf6(*src);
}
- pr.d_ip->ip_sum=0;
pw.write();
}
}