Skip to content

ts_tunnel: use carrier structs to pass global and peer state to handshakes - #376

Merged
danderson merged 1 commit into
mainfrom
push-wsxwqvrptrzs
Aug 19, 2026
Merged

ts_tunnel: use carrier structs to pass global and peer state to handshakes#376
danderson merged 1 commit into
mainfrom
push-wsxwqvrptrzs

Conversation

@danderson

Copy link
Copy Markdown
Member

Updates #339

Change-Id: I3723948a6807c0c92946ca1c423c21be6a6a6964


Followup to #368, which greatly shrinks function signatures by formalizing that there is a carrier for endpoint-global state and one for peer configuration, and passing those to the handshake logic instead of handing out bits and pieces of each. These two carrier structs are the existing EndpointState and PeerConfig, with the latter having the peer ID folded into it.

@nrc nrc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just two nits. This is a nice refactoring!

Comment thread ts_tunnel/src/endpoint.rs Outdated
Comment thread ts_runtime/src/dataplane.rs Outdated
…hakes

Updates #339

Signed-off-by: David Anderson <danderson@tailscale.com>
Change-Id: I3723948a6807c0c92946ca1c423c21be6a6a6964
@danderson
danderson merged commit 4bc48ba into main Aug 19, 2026
23 checks passed
@danderson
danderson deleted the push-wsxwqvrptrzs branch August 19, 2026 17:08
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