summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2000-11-01 11:21:45 +0000
committerru <ru@FreeBSD.org>2000-11-01 11:21:45 +0000
commitadd1652da4f0c461be24168f9799c5662ccfc087 (patch)
treec2c975c77290f7b13d806f18328d0d02238f9a7a /sys/netinet
parent6ee9391fb4778734f873b53db835c0b17ecebcc3 (diff)
downloadFreeBSD-src-add1652da4f0c461be24168f9799c5662ccfc087.zip
FreeBSD-src-add1652da4f0c461be24168f9799c5662ccfc087.tar.gz
Wrong checksum used for certain reassembled IP packets before diverting.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_input.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 0405b96..beb620b 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -675,7 +675,10 @@ found:
HTONS(ip->ip_len);
HTONS(ip->ip_off);
ip->ip_sum = 0;
- ip->ip_sum = in_cksum_hdr(ip);
+ if (hlen == sizeof(struct ip))
+ ip->ip_sum = in_cksum_hdr(ip);
+ else
+ ip->ip_sum = in_cksum(m, hlen);
NTOHS(ip->ip_off);
NTOHS(ip->ip_len);
ip->ip_len -= hlen;
OpenPOWER on IntegriCloud