Fix checksum computation. Previously it didn't include carry.

Reviewed by:	tuexen
This commit is contained in:
Pyun YongHyeon 2014-05-13 05:07:03 +00:00
parent ee2dbd023c
commit c732cd1af1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265942

View File

@ -1080,8 +1080,9 @@ ip_reass(struct mbuf *m)
* (and not in for{} loop), though it implies we are not going to
* reassemble more than 64k fragments.
*/
m->m_pkthdr.csum_data =
(m->m_pkthdr.csum_data & 0xffff) + (m->m_pkthdr.csum_data >> 16);
while (m->m_pkthdr.csum_data & 0xffff0000)
m->m_pkthdr.csum_data = (m->m_pkthdr.csum_data & 0xffff) +
(m->m_pkthdr.csum_data >> 16);
#ifdef MAC
mac_ipq_reassemble(fp, m);
mac_ipq_destroy(fp);