Skip to content

tcp: update TS.Recent from a zero-window probe - #15291

Merged
copybara-service[bot] merged 1 commit into
gvisor:masterfrom
adi-IL:bot/gvisor-15143
Oct 8, 2026
Merged

copybara-service[bot] merged 1 commit into
gvisor:masterfrom
adi-IL:bot/gvisor-15143

Conversation

@adi-IL

@adi-IL adi-IL commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #15143.

A one-byte zero-window probe at RCV.NXT fails the acceptability check in rcv.go. The endpoint answers it with an out-of-window ACK before TS.Recent is updated. That ACK echoes the TSval of the last data segment accepted before the window closed.

RFC 7323 section 4.3 updates TS.Recent from any segment with SEG.SEQ <= Last.ACK.sent. This change updates TS.Recent for a probe at RCV.NXT when timestamps are enabled, then sends the ACK.

Testing:

  • New TestTimeStampZeroWindowProbe in tcp_timestamp_test.go. Without the rcv.go change it fails with got = 101, want = 201.
  • tcp_timestamp_test (7/7), tcp_test and rcv_test pass locally under bazel.

A one-byte zero-window probe at RCV.NXT fails the acceptability check
and is answered through maybeSendOutOfWindowAck before TS.Recent is
updated, so the ACK echoes the TSval of the last data segment accepted
before the window closed.

RFC 7323 section 4.3 rule 2 updates TS.Recent from any segment with
SEG.SEQ <= Last.ACK.sent, so update it for a probe at RCV.NXT before
sending the out-of-window ACK.

Fixes gvisor#15143

@milantracy milantracy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@milantracy milantracy added the ready to pull Causes the PR to be imported into Google. Will be removed soon. label Oct 4, 2026
copybara-service Bot pushed a commit that referenced this pull request Oct 8, 2026
Fixes #15143.

A one-byte zero-window probe at RCV.NXT fails the acceptability check in `rcv.go`. The endpoint answers it with an out-of-window ACK before TS.Recent is updated. That ACK echoes the TSval of the last data segment accepted before the window closed.

RFC 7323 section 4.3 updates TS.Recent from any segment with SEG.SEQ <= Last.ACK.sent. This change updates TS.Recent for a probe at RCV.NXT when timestamps are enabled, then sends the ACK.

Testing:
- New `TestTimeStampZeroWindowProbe` in `tcp_timestamp_test.go`. Without the `rcv.go` change it fails with `got = 101, want = 201`.
- `tcp_timestamp_test` (7/7), `tcp_test` and `rcv_test` pass locally under bazel.
FUTURE_COPYBARA_INTEGRATE_REVIEW=#15291 from adi-IL:bot/gvisor-15143 8f6f546
PiperOrigin-RevId: 993349680
@copybara-service
copybara-service Bot merged commit 25e4d47 into gvisor:master Oct 8, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to pull Causes the PR to be imported into Google. Will be removed soon.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ACK of a zero-window probe echoes a stale timestamp

2 participants