summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/udp6_usrreq.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index 7eb64fd..b837601 100644
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -235,18 +235,9 @@ udp6_input(struct mbuf **mp, int *offp, int proto)
/* 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;
}
}
OpenPOWER on IntegriCloud