From owner-svn-src-head@FreeBSD.ORG Fri Oct 3 08:46:50 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C134694C; Fri, 3 Oct 2014 08:46:50 +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 ADAD1BB4; Fri, 3 Oct 2014 08:46:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s938ko4J037453; Fri, 3 Oct 2014 08:46:50 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s938koJ6037452; Fri, 3 Oct 2014 08:46:50 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410030846.s938koJ6037452@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 3 Oct 2014 08:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272469 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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: Fri, 03 Oct 2014 08:46:50 -0000 Author: tuexen Date: Fri Oct 3 08:46:49 2014 New Revision: 272469 URL: https://svnweb.freebsd.org/changeset/base/272469 Log: UPD and UDPLite require a checksum. So check for it. MFC after: 3 days Modified: head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Fri Oct 3 04:13:25 2014 (r272468) +++ head/sys/netinet6/udp6_usrreq.c Fri Oct 3 08:46:49 2014 (r272469) @@ -237,11 +237,19 @@ udp6_input(struct mbuf **mp, int *offp, /* XXX: What is the right UDPLite MIB counter? */ goto badunlocked; } + if (uh->uh_sum == 0) { + /* XXX: What is the right UDPLite MIB counter? */ + goto badunlocked; + } } else { if ((ulen < sizeof(struct udphdr)) || (plen != ulen)) { UDPSTAT_INC(udps_badlen); goto badunlocked; } + if (uh->uh_sum == 0) { + UDPSTAT_INC(udps_nosum); + goto badunlocked; + } } if ((m->m_pkthdr.csum_flags & CSUM_DATA_VALID_IPV6) &&