2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 23:31:39 +00:00

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

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 */