Date: Mon, 6 Oct 2014 16:59:26 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272660 - stable/10/sys/netinet Message-ID: <201410061659.s96GxQqD086570@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Mon Oct 6 16:59:25 2014 New Revision: 272660 URL: https://svnweb.freebsd.org/changeset/base/272660 Log: MFC r272326: UDPLite requires a checksum. Therefore, discard a received packet if the checksum is 0. Modified: stable/10/sys/netinet/udp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/udp_usrreq.c ============================================================================== --- stable/10/sys/netinet/udp_usrreq.c Mon Oct 6 15:48:28 2014 (r272659) +++ stable/10/sys/netinet/udp_usrreq.c Mon Oct 6 16:59:25 2014 (r272660) @@ -488,8 +488,16 @@ udp_input(struct mbuf *m, int off) m_freem(m); return; } - } else - UDPSTAT_INC(udps_nosum); + } else { + if (pr == IPPROTO_UDP) { + UDPSTAT_INC(udps_nosum); + } else { + /* UDPLite requires a checksum */ + /* XXX: What is the right UDPLite MIB counter here? */ + m_freem(m); + return; + } + } pcbinfo = get_inpcbinfo(pr); 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?201410061659.s96GxQqD086570>