Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The checksum bug is because we have assumed that the two's complement (i.e. C's operator ~) subtraction, which is currently being used, is the same as "subtracting complements with borrow" under one's complement as required in RFC1624. While these two operations often come up with the same result, they are often not equal too. In addition, the two's complement subtraction is not endianness preserving! To solve this issue, we followed the example implmentation of RFC1624 [Eqn. 3] in Linux kernel: https://elixir.bootlin.com/linux/latest/source/net/ipv4/netfilter/ipt_ECN.c#L38
- Loading branch information