Date: Tue, 30 Sep 2014 13:47:34 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Michael Tuexen <tuexen@freebsd.org> Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org> Subject: Re: svn commit: r272326 - head/sys/netinet Message-ID: <CAJ-VmokpSDkJGzWajLafemKgc_zx%2B8H05vFzjvSKdYRS2c79CQ@mail.gmail.com> In-Reply-To: <201409302029.s8UKTx0e098653@svn.freebsd.org> References: <201409302029.s8UKTx0e098653@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, I think you should consider adding a new set of protocol counters for UDPLITE. :) -a On 30 September 2014 13:29, Michael Tuexen <tuexen@freebsd.org> 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)) || >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokpSDkJGzWajLafemKgc_zx%2B8H05vFzjvSKdYRS2c79CQ>