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