Skip to content

internet: fix UDP header checksum

Tommaso Pecorella requested to merge tommypec/ns-3-dev:updfixes into master

RFC 768: If the computed checksum is zero, it is transmitted as all ones

This MR fixes that, and the decoding as well.

Thanks the Almighty that I'm pedantic and I triple check calculations. It turns out that on Rx you don't have to do any math, because it's not needed.

I added a LONG note on why it's not needed, for future reference.

Edited by Tommaso Pecorella

Merge request reports