disco: fix endpoint encoding - #402
Merged
Merged
Conversation
npry
requested review from
danderson,
dylan-tailscale and
nrc
as code owners
September 15, 2026 10:07
Main thing is to capture the sender pubkey and source endpoint; I was hitting some transient errors and this helped resolve. Signed-off-by: Nathan Perry <nathan@tailscale.com> Change-Id: I7e18d4bc60a3f755a0aaa30402087a626a6a6964
Signed-off-by: Nathan Perry <nathan@tailscale.com> Change-Id: I78b1fcef9103bd08dfb1f50bb64da1ab6a6a6964
npry
force-pushed
the
npry/disco.fix-ep-encoding
branch
from
September 15, 2026 20:17
1b6a6d6 to
1330438
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.
I was debugging something else and saw addresses that looked like
26:cdab:1ef:302:504:706:908:b0anext to addresses that looked like2600:abcd:ef01:203:405:607:809:a0bin Wireshark during disco packet exchanges. Turns out we had an endianness bug in disco on the endpoint encoding. Hadn't caught it until now because these get packed intoCallMeMaybemessages and the reverse (decode) direction was working fine -- and I'm usually debugging on the peer actually runningtailscale-rs, where the remote is a gotailscalednode. So the peer was just getting nonsense addresses from us, but endpoints via control probably made this turn out fine, as well as reverse-path.The second commit is logging improvements to add a couple of fields when disco throws errors decrypting a packet. It makes one notable behavior change: we keep trying to decrypt more packets from the same batch rather than bailing early.