Displaying 1 result from an estimated 1 matches for "inet_checksum".
Did you mean:
get_checksum
2003 Oct 03
0
SIGBUS on SPARCv9
...@@
cp();
- hdr = (struct ip *)(packet->data + 14);
+ phdr = (struct ip *)(packet->data + 14);
icmp = (struct icmp *)(packet->data + 14 + 20);
/* Remember original source and destination */
@@ -217,7 +219,9 @@
memcpy(&hdr->ip_dst, &ip_src, 4);
hdr->ip_sum = inet_checksum(hdr, 20, ~0);
-
+
+ memcpy(phdr, hdr, sizeof(*phdr));
+
/* Fill in ICMP header */
icmp->icmp_type = ICMP_DEST_UNREACH;