1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Fix pseudo checksum calculation.

This fixes ipfilter w/ network controllers that implement only
partial rx csum offloading.

PR:			106438
Obtained from:		upstream
MFC after:		1 week
This commit is contained in:
Max Khon 2012-09-27 18:15:01 +00:00
parent b30cd8df7c
commit 617643aaa6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=241002

View File

@ -1357,7 +1357,9 @@ fr_info_t *fin;
else
sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr,
htonl(m->m_pkthdr.csum_data +
fin->fin_ip->ip_len + fin->fin_p));
fin->fin_ip->ip_len -
(fin->fin_ip->ip_hl << 2) +
fin->fin_p));
sum ^= 0xffff;
if (sum != 0) {
fin->fin_flx |= FI_BAD;