On 30 Sep 2014, at 22:47, Adrian Chadd <adr...@freebsd.org> wrote: > Hi, > > I think you should consider adding a new set of protocol counters for > UDPLITE. :) Yepp. There is http://tools.ietf.org/html/rfc5097 which needs to be implemented.
Best regards Michael > > > > -a > > On 30 September 2014 13:29, Michael Tuexen <tue...@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)) || >> > > _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"