UPD and UDPLite require a checksum. So check for it.
MFC after: 3 days
This commit is contained in:
parent
d17183901f
commit
4e1730b532
@ -237,11 +237,19 @@ udp6_input(struct mbuf **mp, int *offp, int proto)
|
||||
/* 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) &&
|
||||
|
Loading…
Reference in New Issue
Block a user