summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/rseq.go
diff options
context:
space:
mode:
authorBhasker Hariharan <bhaskerh@google.com>2020-10-09 18:59:48 -0700
committergVisor bot <gvisor-bot@google.com>2020-10-09 19:02:03 -0700
commitdb36d948fa63ce950d94a5e8e9ebc37956543661 (patch)
tree123b5ab20650dbb5f79300a4d68d2d98e4c79cfe /pkg/sentry/kernel/rseq.go
parentd75fe7660a61a454ece9472658eac609b3bf61e6 (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/sentry/kernel/rseq.go')
0 files changed, 0 insertions, 0 deletions