david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Allow empty checksums on received packets

This commit is contained in:
Michael Brown 2007-01-04 05:17:28 +00:00
parent 290c5ee779
commit 20681d6168
1 changed files with 8 additions and 6 deletions

View File

@ -239,12 +239,14 @@ static int udp_rx ( struct pk_buff *pkb, struct sockaddr_tcpip *st_src,
rc = -EINVAL;
goto done;
}
csum = tcpip_continue_chksum ( pshdr_csum, pkb->data, ulen );
if ( csum != 0 ) {
DBG ( "UDP checksum incorrect (is %04x including checksum "
"field, should be 0000)\n", csum );
rc = -EINVAL;
goto done;
if ( udphdr->chksum ) {
csum = tcpip_continue_chksum ( pshdr_csum, pkb->data, ulen );
if ( csum != 0 ) {
DBG ( "UDP checksum incorrect (is %04x including "
"checksum field, should be 0000)\n", csum );
rc = -EINVAL;
goto done;
}
}
/* Parse parameters from header and strip header */