Bug 215674

Summary: ip_compute_csum computes illegal zero checksum, should return ffff in such a case
Product: Networking Reporter: Eyal Lotem (eyal.lotem)
Component: OtherAssignee: Stephen Hemminger (stephen)
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.14.268 Subsystem:
Regression: No Bisected commit-id:

Description Eyal Lotem 2022-03-11 11:47:49 UTC
A 0 checksum indicates the checksum is to not be validated, and an 0xffff checksum indicates a zero result.

If the sum is computed to be 0, it should be substituted for 0xffff, to indicate the actual zero checksum.

This bug went unnoticed for a long time, because in 2^-16 of computed checksums, the incorrect result merely foregoes checksum validation, which is likely to not trigger any noticeable errors.