Subject: Re: Zero checksum in netconsole/netdump packets

From: Gerrit Renker <[email-masked]>
Date: Tue, 7 Nov 2006 10:09:02 +0000

Quoting Chris Lalancette:
|  Hello,
|       I realized that all of the packets that go from the crashing machine to the netdump server have a zero checksum. 
<snip>
|       Assuming that this is just an oversight, attached is a simple patch to compute the UDP checksum in netpoll_send_udp.
|  
|  Signed-off-by: Chris Lalancette <[email-masked]>
|  
RFC 768 allows to not compute the checksum by leaving uh->check at 0 - hence it is not illegal.
But without David's suggestion the code is not valid, since otherwise there is no way of 
distinguishing a computed `0' from an ignored `0' field:
 if ( udph->check == 0 )
	udph->check = -1;