diff options
author | Bhasker Hariharan <bhaskerh@google.com> | 2020-10-09 18:59:48 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-09 19:02:03 -0700 |
commit | db36d948fa63ce950d94a5e8e9ebc37956543661 (patch) | |
tree | 123b5ab20650dbb5f79300a4d68d2d98e4c79cfe /pkg/tcpip/link/sniffer/pcap.go | |
parent | d75fe7660a61a454ece9472658eac609b3bf61e6 (diff) |
TCP Receive window advertisement fixes.
The fix in commit 028e045da93b7c1c26417e80e4b4e388b86a713d was incorrect as
it can cause the right edge of the window to shrink when we announce
a zero window due to receive buffer being full as its done before the check
for seeing if the window is being shrunk because of the selected window.
Further the window was calculated purely on available space but in cases where
we are getting full sized segments it makes more sense to use the actual bytes
being held. This CL changes to use the lower of the total available space vs
the available space in the maximal window we could advertise minus the actual
payload bytes being held.
This change also cleans up the code so that the window selection logic is
not duplicated between getSendParams() and windowCrossedACKThresholdLocked.
PiperOrigin-RevId: 336404827
Diffstat (limited to 'pkg/tcpip/link/sniffer/pcap.go')
0 files changed, 0 insertions, 0 deletions