Calculating UDP Checksum - HOW?

Eddie Kohler kohler at icir.org
Tue Jul 23 11:34:08 EDT 2002


> This seems very strange to me and in fact this can't be a coïncidence.
> 
> Do you have any explanation for this fact? Is it logical to you?

Yes, it makes perfect sense. SetTCPChecksum doesn't check to make sure that
its packet is TCP. (This is by design. Many Click elements do minimal
checking to avoid redundant computation.) Therefore it treated your packet
like a TCP packet and modified the TCP checksum, which occurs at offsets
16-17 past the end of the IP header. This is in the middle of your RTP
header, I'd guess. The UDP checksum occurs at offsets 6-7.

Eddie




More information about the click mailing list