HomeFreeBSD

tcp: Correctly compute the retransmit length for all 64-bit platforms.

Description

tcp: Correctly compute the retransmit length for all 64-bit platforms.

When the TCP sequence number subtracted is greater than 232 minus
the window size, or 2
31 minus the window size, the use of unsigned
long as an intermediate variable, may result in an incorrect retransmit
length computation on all 64-bit platforms.

While at it create a helper macro to facilitate the computation of
the difference between two TCP sequence numbers.

Differential Revision: https://reviews.freebsd.org/D35388
Reviewed by: rscheff
Sponsored by: NVIDIA Networking

(cherry picked from commit 28173d49dccb91e50be9c401dbad1da908a5dc75)

Details

Provenance
hselaskyAuthored on Jun 2 2022, 6:33 PM
Reviewer
rscheff
Differential Revision
D35388: tcp: Correctly compute the retransmit length for all 64-bit platforms.
Parents
rG68c5b09208b8: lib/libgssapi: Trailing whitespace cleanup
Branches
Unknown
Tags
Unknown