Skip to content

ts_tunnel: manage event lifecycle better, and recover from the stuck responder state - #390

Merged
danderson merged 2 commits into
mainfrom
push-rtkmvntrsooq
Sep 1, 2026
Merged

ts_tunnel: manage event lifecycle better, and recover from the stuck responder state#390
danderson merged 2 commits into
mainfrom
push-rtkmvntrsooq

Conversation

@danderson

Copy link
Copy Markdown
Member

Two separate commits.

The first just replaces an uncancelable event with an event that gets canceled when the related session state is dropped, so we avoid some unnecessary timer callbacks.

The second cleans up half-completed handshakes in the responder role, where the initiator never confirms the session. Previously ts_tunnel just got stuck in that scenario, with the pending handshake unable to ever be cleared. With this change, it follows the behavior of the reference implementation and abandons the handshake when the unconfirmed session expires (i.e. couldn't be confirmed any more even if the initiator tried).

This allows a stuck responder to eventually recover, and potentially become the initiator later on if it wants to transmit.

Updates #339

Comment thread ts_tunnel/src/session.rs Outdated
…etime

Signed-off-by: David Anderson <danderson@tailscale.com>
Change-Id: Icf2ccebcc78b533ac2534047c9a4c14d6a6a6964
Updated #339

Signed-off-by: David Anderson <danderson@tailscale.com>
Change-Id: I86fd4c687bb92bab731c3460f63130c66a6a6964
@danderson
danderson enabled auto-merge (rebase) September 1, 2026 18:04
@danderson
danderson merged commit 566f298 into main Sep 1, 2026
22 of 23 checks passed
@danderson
danderson deleted the push-rtkmvntrsooq branch September 1, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants