From owner-svn-src-all@FreeBSD.ORG Tue May 13 05:07:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D36A5AB; Tue, 13 May 2014 05:07:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A9BC2B50; Tue, 13 May 2014 05:07:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4D57339067000; Tue, 13 May 2014 05:07:03 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4D573Qf066999; Tue, 13 May 2014 05:07:03 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201405130507.s4D573Qf066999@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 13 May 2014 05:07:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265942 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 05:07:03 -0000 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);