svn commit: r272663 - stable/10/sys/netinet6
Michael Tuexen
tuexen at FreeBSD.org
Mon Oct 6 17:12:04 UTC 2014
Author: tuexen
Date: Mon Oct 6 17:12:03 2014
New Revision: 272663
URL: https://svnweb.freebsd.org/changeset/base/272663
Log:
MFC r272408:
Check for UDP/IPv6 packets that the length in the UDP header is at least
the minimum. Make the check similar to the one for UDPLite/IPv6.
Modified:
stable/10/sys/netinet6/udp6_usrreq.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/netinet6/udp6_usrreq.c
==============================================================================
--- stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 17:08:19 2014 (r272662)
+++ stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 17:12:03 2014 (r272663)
@@ -235,18 +235,9 @@ udp6_input(struct mbuf **mp, int *offp,
/* XXX: What is the right UDPLite MIB counter? */
goto badunlocked;
}
- }
- if (nxt == IPPROTO_UDP && plen != ulen) {
- UDPSTAT_INC(udps_badlen);
- goto badunlocked;
- }
-
- /*
- * Checksum extended UDP header and data.
- */
- if (uh->uh_sum == 0) {
- if (ulen > plen || ulen < sizeof(struct udphdr)) {
- UDPSTAT_INC(udps_nosum);
+ } else {
+ if ((ulen < sizeof(struct udphdr)) || (plen != ulen)) {
+ UDPSTAT_INC(udps_badlen);
goto badunlocked;
}
}
More information about the svn-src-stable-10
mailing list