HomeFreeBSD

tcp: fix checksum calculation bug

Description

tcp: fix checksum calculation bug

The new function in_delayed_cksum_o() was introduced to compute
the checksum in the case the mbuf chain does not start with the
IP header. The offset of the IP header is specified by the
parameter iph_offset.
If iph_offset was positive, the function computed an incorrect
checksum.

Reviewed by: sobomax, tuexen
Fixes: 5feb38e37847 ("netinet: provide "at offset" variant of the in_delayed_cksum() API")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54269

Details

Provenance
timo.voelker_fh-muenster.deAuthored on Dec 19 2025, 4:50 PM
tuexenCommitted on Dec 19 2025, 4:50 PM
Reviewer
rG5feb38e37847: netinet: provide "at offset" variant of the in_delayed_cksum() API
Differential Revision
D54269: netinet: fix checksum calculation bug
Parents
rG8da838ac3169: vtnet: improve consistency
Branches
Unknown
Tags
Unknown