From owner-svn-src-stable@freebsd.org Sat Jan 16 18:59:11 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8C22A8579B; Sat, 16 Jan 2016 18:59:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B947B1623; Sat, 16 Jan 2016 18:59:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0GIxApv073356; Sat, 16 Jan 2016 18:59:10 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0GIxA60073355; Sat, 16 Jan 2016 18:59:10 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201601161859.u0GIxA60073355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 16 Jan 2016 18:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r294189 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2016 18:59:12 -0000 Author: tuexen Date: Sat Jan 16 18:59:10 2016 New Revision: 294189 URL: https://svnweb.freebsd.org/changeset/base/294189 Log: MFC r291364: When receiving an SCTP/UDP packet and the interface performed the UDP checksum computation and signals that it was OK, clear this bit when passing the packet to SCTP. Since the bits indicating a valid UDP checksum and a valid SCTP checksum are the same, the SCTP stack would assume that also an SCTP checksum check has been performed. Modified: stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Sat Jan 16 18:39:54 2016 (r294188) +++ stable/10/sys/netinet/sctputil.c Sat Jan 16 18:59:10 2016 (r294189) @@ -6957,6 +6957,18 @@ sctp_recv_udp_tunneled_packet(struct mbu for (last = m; last->m_next; last = last->m_next); last->m_next = sp; m->m_pkthdr.len += sp->m_pkthdr.len; + /* + * The CSUM_DATA_VALID flags indicates that the HW checked the UDP + * checksum and it was valid. Since CSUM_DATA_VALID == + * CSUM_SCTP_VALID this would imply that the HW also verified the + * SCTP checksum. Therefore, clear the bit. + */ + SCTPDBG(SCTP_DEBUG_CRCOFFLOAD, + "sctp_recv_udp_tunneled_packet(): Packet of length %d received on %s with csum_flags 0x%b.\n", + m->m_pkthdr.len, + if_name(m->m_pkthdr.rcvif), + (int)m->m_pkthdr.csum_flags, CSUM_BITS); + m->m_pkthdr.csum_flags &= ~CSUM_DATA_VALID; iph = mtod(m, struct ip *); switch (iph->ip_v) { #ifdef INET