If the checksum coverage field in the UDPLITE header is the length
of the complete UDPLITE packet, the packet has full checksum coverage. SO fix the condition. Reviewed by: kevlo MFC after: 3 days
This commit is contained in:
parent
59adbba20f
commit
0f4a03663b
@ -444,9 +444,10 @@ udp_input(struct mbuf **mp, int *offp, int proto)
|
||||
*/
|
||||
len = ntohs((u_short)uh->uh_ulen);
|
||||
ip_len = ntohs(ip->ip_len) - iphlen;
|
||||
if (proto == IPPROTO_UDPLITE && len == 0) {
|
||||
if (proto == IPPROTO_UDPLITE && (len == 0 || len == ip_len)) {
|
||||
/* Zero means checksum over the complete packet. */
|
||||
len = ip_len;
|
||||
if (len == 0)
|
||||
len = ip_len;
|
||||
cscov_partial = 0;
|
||||
}
|
||||
if (ip_len != len) {
|
||||
|
@ -227,9 +227,10 @@ udp6_input(struct mbuf **mp, int *offp, int proto)
|
||||
|
||||
nxt = ip6->ip6_nxt;
|
||||
cscov_partial = (nxt == IPPROTO_UDPLITE) ? 1 : 0;
|
||||
if (nxt == IPPROTO_UDPLITE && ulen == 0) {
|
||||
if (nxt == IPPROTO_UDPLITE && (ulen == 0 || ulen == plen)) {
|
||||
/* Zero means checksum over the complete packet. */
|
||||
ulen = plen;
|
||||
if (ulen == 0)
|
||||
ulen = plen;
|
||||
cscov_partial = 0;
|
||||
}
|
||||
if (nxt == IPPROTO_UDP && plen != ulen) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user