Page MenuHomeFreeBSD

tcp: count only the SACK blocks that fit in tcp_maxseg()
Needs ReviewPublic

Authored by nick_spun.io on Thu, Oct 8, 5:43 AM.
Tags
None
Referenced Files
F175195618: D60460.diff
Fri, Oct 9, 12:39 AM
F175185139: D60460.id189026.diff
Thu, Oct 8, 10:46 PM
F175176058: D60460.id189026.diff
Thu, Oct 8, 9:30 PM
F175144158: D60460.diff
Thu, Oct 8, 3:17 PM

Details

Reviewers
tuexen
rscheff
glebius
Group Reviewers
transport
Summary

tcp_addoptions() sends only the SACK blocks that fit in TCP_MAXOLEN.
tcp_maxseg() counted every pending block and clamped the total, so
without timestamps and with five or more blocks pending it came out 4
bytes below the segment tcp_output() sends. Limited transmit after an
RTO then sent one full segment and failed the "sent too much" KASSERT.

PR: 282605

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77839
Build 74722: arc lint + arc unit

Event Timeline

glebius added reviewers: tuexen, rscheff.

Looks correct, but let's check with @rscheff. Thanks!

sys/netinet/tcp_subr.c
3806

I'd suggest to declare sockblks in this scope. Up to you.