From owner-svn-src-head@FreeBSD.ORG Thu Sep 27 18:15:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 82A8E1065686; Thu, 27 Sep 2012 18:15:02 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A2098FC12; Thu, 27 Sep 2012 18:15:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8RIF2jW070055; Thu, 27 Sep 2012 18:15:02 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8RIF2vT070051; Thu, 27 Sep 2012 18:15:02 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201209271815.q8RIF2vT070051@svn.freebsd.org> From: Max Khon Date: Thu, 27 Sep 2012 18:15:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241002 - head/sys/contrib/ipfilter/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Sep 2012 18:15:02 -0000 Author: fjoe Date: Thu Sep 27 18:15:01 2012 New Revision: 241002 URL: http://svn.freebsd.org/changeset/base/241002 Log: 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 Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Thu Sep 27 17:48:04 2012 (r241001) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Thu Sep 27 18:15:01 2012 (r241002) @@ -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;