From owner-svn-src-head@FreeBSD.ORG Tue Sep 30 20:47:37 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 73E02148; Tue, 30 Sep 2014 20:47:37 +0000 (UTC) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93D6EB85; Tue, 30 Sep 2014 20:47:36 +0000 (UTC) Received: by mail-wg0-f48.google.com with SMTP id l18so3486996wgh.31 for ; Tue, 30 Sep 2014 13:47:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=hMOYhXI3VjgKzPa7pzwjjQv7xlvHyLerV3DO3S6V16I=; b=XrOKpSS3HTE8EvAyX2mwMfIa5sUL3vX2CQCZLocek+GgDemBGJa5Joe504/NK6+fTR RhwBjbKbidrFKW7T1pAivNWbgmOtYJwZgpmHFH+tTpq8pxhzU5ch6LRk0Bhg/8kMhnmJ niU4E+ywB6Q7Tr1+Mk7qqFjBQ6KeWJ8Or2C84/9GvPfICwCM6p+8Tb9TCdoUMimsbA3u dO9ClwBg34L6Pd1VZbnhV5Gy5HNKm5NPhtSbYg6L+q0M4dJbtgIdjPP010kcpsPBxcim jMq+k1M1iAK+UKECIgYPgfYvsxnSm14HXDFYelpfF4Y/fc6PTK7sYsCSrpRQAjXH1U7H fwGA== MIME-Version: 1.0 X-Received: by 10.180.74.203 with SMTP id w11mr8709218wiv.26.1412110054929; Tue, 30 Sep 2014 13:47:34 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Tue, 30 Sep 2014 13:47:34 -0700 (PDT) In-Reply-To: <201409302029.s8UKTx0e098653@svn.freebsd.org> References: <201409302029.s8UKTx0e098653@svn.freebsd.org> Date: Tue, 30 Sep 2014 13:47:34 -0700 X-Google-Sender-Auth: RdEtaBpv-AzisyBpzQYXvi39vjU Message-ID: Subject: Re: svn commit: r272326 - head/sys/netinet From: Adrian Chadd To: Michael Tuexen Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" 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: Tue, 30 Sep 2014 20:47:37 -0000 Hi, I think you should consider adding a new set of protocol counters for UDPLITE. :) -a On 30 September 2014 13:29, Michael Tuexen wrote: > Author: tuexen > Date: Tue Sep 30 20:29:58 2014 > New Revision: 272326 > URL: http://svnweb.freebsd.org/changeset/base/272326 > > Log: > UDPLite requires a checksum. Therefore, discard a received packet if > the checksum is 0. > > MFC after: 3 days > > Modified: > head/sys/netinet/udp_usrreq.c > > Modified: head/sys/netinet/udp_usrreq.c > ============================================================================== > --- head/sys/netinet/udp_usrreq.c Tue Sep 30 20:18:10 2014 (r272325) > +++ head/sys/netinet/udp_usrreq.c Tue Sep 30 20:29:58 2014 (r272326) > @@ -498,8 +498,16 @@ udp_input(struct mbuf **mp, int *offp, i > m_freem(m); > return (IPPROTO_DONE); > } > - } else > - UDPSTAT_INC(udps_nosum); > + } else { > + if (proto == IPPROTO_UDP) { > + UDPSTAT_INC(udps_nosum); > + } else { > + /* UDPLite requires a checksum */ > + /* XXX: What is the right UDPLite MIB counter here? */ > + m_freem(m); > + return (IPPROTO_DONE); > + } > + } > > pcbinfo = get_inpcbinfo(proto); > if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || >