-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in_cksum falls over with struct ip in a union of uint16_t with some compilers. The fix is to create a smaller pseudo header, fill in the bits we need and then copy this to a uint8_t array which we then send to in_cksum. Tested on Debian-12 with clang-15 and CFLAGS=-Os While here, just check that the UDP checksum check is zero rather than zeroing it out and checking it matches. Co-authored-by: Zikai Chen <[email protected]>
- Loading branch information
Showing
1 changed file
with
29 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters