svn commit: r272469 - head/sys/netinet6
Michael Tuexen
tuexen at FreeBSD.org
Fri Oct 3 08:46:50 UTC 2014
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) &&
More information about the svn-src-head
mailing list