mirror of https://github.com/ipxe/ipxe.git
Allow empty checksums on received packets
parent
290c5ee779
commit
20681d6168
|
@ -239,13 +239,15 @@ static int udp_rx ( struct pk_buff *pkb, struct sockaddr_tcpip *st_src,
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
if ( udphdr->chksum ) {
|
||||||
csum = tcpip_continue_chksum ( pshdr_csum, pkb->data, ulen );
|
csum = tcpip_continue_chksum ( pshdr_csum, pkb->data, ulen );
|
||||||
if ( csum != 0 ) {
|
if ( csum != 0 ) {
|
||||||
DBG ( "UDP checksum incorrect (is %04x including checksum "
|
DBG ( "UDP checksum incorrect (is %04x including "
|
||||||
"field, should be 0000)\n", csum );
|
"checksum field, should be 0000)\n", csum );
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Parse parameters from header and strip header */
|
/* Parse parameters from header and strip header */
|
||||||
st_src->st_port = udphdr->source_port;
|
st_src->st_port = udphdr->source_port;
|
||||||
|
|
Loading…
Reference in New Issue