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; rc = -EINVAL;
goto done; goto done;
} }
csum = tcpip_continue_chksum ( pshdr_csum, pkb->data, ulen ); if ( udphdr->chksum ) {
if ( csum != 0 ) { csum = tcpip_continue_chksum ( pshdr_csum, pkb->data, ulen );
DBG ( "UDP checksum incorrect (is %04x including checksum " if ( csum != 0 ) {
"field, should be 0000)\n", csum ); DBG ( "UDP checksum incorrect (is %04x including "
rc = -EINVAL; "checksum field, should be 0000)\n", csum );
goto done; rc = -EINVAL;
goto done;
}
} }
/* Parse parameters from header and strip header */ /* Parse parameters from header and strip header */