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
F175644004: D60460.id189278.diff
Mon, Oct 12, 6:14 AM
F175608536: D60460.id189278.diff
Mon, Oct 12, 12:36 AM
F175608199: D60460.id189279.diff
Mon, Oct 12, 12:33 AM
F175608022: D60460.id189026.diff
Mon, Oct 12, 12:31 AM
F175589458: D60460.id189279.diff
Sun, Oct 11, 9:21 PM
F175585816: sent-too-much-964x960_tcp_log.bin
Sun, Oct 11, 8:46 PM
F175585789: sent-too-much-sack-optlen.pkt
Sun, Oct 11, 8:46 PM
F175578278: D60460.id189278.diff
Sun, Oct 11, 7:40 PM

Details

Reviewers
tuexen
rscheff
glebius
adrian
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 77915
Build 74798: 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–3807

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

Let me write a packetdrill-test to make sure we catch an KASSERT-issue.

I am trying to trigger a "sent too much" KASSERT but was not successful up to now. Can you provide a BBLog file of such a situation?

I am trying to trigger a "sent too much" KASSERT but was not successful up to now. Can you provide a BBLog file of such a situation?

Here's a bblog file and a packetdrill repro


I am trying to trigger a "sent too much" KASSERT but was not successful up to now. Can you provide a BBLog file of such a situation?

Here's a bblog file and a packetdrill repro


How can I access these files?

I am trying to trigger a "sent too much" KASSERT but was not successful up to now. Can you provide a BBLog file of such a situation?

Here's a bblog file and a packetdrill repro


How can I access these files?

Sorry, I forgot that attached files are still private by default - you should be able to see them now.