Date: Tue, 13 May 2014 05:07:03 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265942 - head/sys/netinet Message-ID: <201405130507.s4D573Qf066999@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Tue May 13 05:07:03 2014 New Revision: 265942 URL: http://svnweb.freebsd.org/changeset/base/265942 Log: Fix checksum computation. Previously it didn't include carry. Reviewed by: tuexen Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Mon May 12 23:35:10 2014 (r265941) +++ head/sys/netinet/ip_input.c Tue May 13 05:07:03 2014 (r265942) @@ -1080,8 +1080,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405130507.s4D573Qf066999>