Subject: Re: UDP checksum trouble in -current
To: None <>
From: YAMAMOTO Takashi <>
List: tech-net
Date: 01/22/2005 19:49:52

> If the receiver is the kernel it is not a problem, but if the receiver is
> a BPF or raw socket it can be.

can raw sockets receive udp packets?

> Either of those may attempt to check the
> UDP ckecksum (tcpdump does, for example).  A value of zero is a clear
> indication not to check it for UDP.  It seems like little pain to be
> "correct".
> I do not know what could be done for IP or TCP checksums.  But, if I'm not
> mistaken, zero is not a valid value for either and might be a good indicator
> that no checksumming was performed.

ok, i see your point.  thanks for explanation.
however, i disagree.

- tcpdump/bpf is also used when debugging network stack.
  in that case, seeing garbage as-is is even expected.

- if you really care about "correctness" of tapped packets,
  you should put correct sums.  zero is not really correct, even for udp.

i guess we decided not to care about this kind of "correctness" much
when we decided to do checksum offloading/omission.