Fix tcp_lro_rx_ipv4() for drivers that do not set CSUM_IP_CHECKED.

Specifcially, in_cksum_hdr() returns 0 (not 0xffff) when the IPv4
checksum is correct. Without this fix, the tcp_lro code will reject
good IPv4 traffic from drivers that do not implement IPv4 header
harder csum offload.

Sponsored by: Myricom Inc.

MFC after:	7 days
This commit is contained in:
Andrew Gallatin 2013-02-21 17:00:35 +00:00
parent 07b9a28adb
commit e5ca1ffab5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=247104

View file

@ -333,7 +333,7 @@ tcp_lro_rx_ipv4(struct lro_ctrl *lc, struct mbuf *m, struct ip *ip4,
}
} else {
csum = in_cksum_hdr(ip4);
if (__predict_false((csum ^ 0xffff) != 0)) {
if (__predict_false((csum) != 0)) {
lc->lro_bad_csum++;
return (TCP_LRO_CANNOT);
}