svn commit: r266211 - stable/9/sys/netinet
Pyun YongHyeon
yongari at FreeBSD.org
Fri May 16 05:06:47 UTC 2014
Author: yongari
Date: Fri May 16 05:06:46 2014
New Revision: 266211
URL: http://svnweb.freebsd.org/changeset/base/266211
Log:
MFC r265942:
Fix checksum computation. Previously it didn't include carry.
Modified:
stable/9/sys/netinet/ip_input.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/netinet/ip_input.c
==============================================================================
--- stable/9/sys/netinet/ip_input.c Fri May 16 05:05:53 2014 (r266210)
+++ stable/9/sys/netinet/ip_input.c Fri May 16 05:06:46 2014 (r266211)
@@ -1108,8 +1108,9 @@ found:
* (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);
More information about the svn-src-stable-9
mailing list