device: add priority message transmission around session establishment#80
Merged
Conversation
jwhited
force-pushed
the
jwhited/tsmp-hook-handshake
branch
3 times, most recently
from
July 10, 2026 04:03
ca42904 to
f4fb2a0
Compare
jwhited
force-pushed
the
jwhited/tsmp-hook-handshake
branch
from
July 10, 2026 23:44
f4fb2a0 to
d947a57
Compare
jwhited
marked this pull request as ready for review
July 10, 2026 23:44
jwhited
requested review from
a team,
bradfitz,
cmol,
creachadair,
danderson,
dylan-tailscale and
raggi
July 10, 2026 23:48
bradfitz
approved these changes
Jul 11, 2026
danderson
approved these changes
Jul 14, 2026
danderson
left a comment
Member
There was a problem hiding this comment.
Seems reasonable to me in isolation.
In the broader context of #20081, I wonder if wg session lifetime is the right scope for this data exchange since those sessions rotate faster than the lifetime of most things in our clients. However, assuming that is the right scope, this implementation seems reasonable to me.
Add SetPriorityMessageOnEstablishmentFunc, which registers a PeerPriorityMessageFunc callback invoked when a peer's session keypair is established or re-keyed for forward data transmission. The bytes it returns are transmitted to the peer as a transport message. The message is "priority" in two senses: it bypasses the staged packet queue entirely, so it cannot be evicted by TUN-sourced packets, and it is enqueued ahead of the keepalive/staged packets that follow keypair establishment. Updates tailscale/tailscale#20081 Signed-off-by: Jordan Whited <jordan@tailscale.com>
jwhited
force-pushed
the
jwhited/tsmp-hook-handshake
branch
from
July 15, 2026 22:19
2fd13ec to
5da8053
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add SetPriorityMessageOnEstablishmentFunc, which registers a
PeerPriorityMessageFunc callback invoked when a peer's session keypair
is established or re-keyed for forward data transmission. The bytes it
returns are transmitted to the peer as a transport message.
The message is "priority" in two senses: it bypasses the staged packet
queue entirely, so it cannot be evicted by TUN-sourced packets, and it
is enqueued ahead of the keepalive/staged packets that follow keypair
establishment.
Updates tailscale/tailscale#20081