diff options
author | ru <ru@FreeBSD.org> | 2000-11-01 11:21:45 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2000-11-01 11:21:45 +0000 |
commit | add1652da4f0c461be24168f9799c5662ccfc087 (patch) | |
tree | c2c975c77290f7b13d806f18328d0d02238f9a7a | |
parent | 6ee9391fb4778734f873b53db835c0b17ecebcc3 (diff) | |
download | FreeBSD-src-add1652da4f0c461be24168f9799c5662ccfc087.zip FreeBSD-src-add1652da4f0c461be24168f9799c5662ccfc087.tar.gz |
Wrong checksum used for certain reassembled IP packets before diverting.
-rw-r--r-- | sys/netinet/ip_input.c | 5 |
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; |