Skip to content

disco: fix endpoint encoding - #402

Merged
npry merged 2 commits into
mainfrom
npry/disco.fix-ep-encoding
Sep 15, 2026
Merged

npry merged 2 commits into
mainfrom
npry/disco.fix-ep-encoding

Conversation

@npry

@npry npry commented Sep 15, 2026

Copy link
Copy Markdown
Member

I was debugging something else and saw addresses that looked like 26:cdab:1ef:302:504:706:908:b0a next to addresses that looked like 2600:abcd:ef01:203:405:607:809:a0b in 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 into CallMeMaybe messages and the reverse (decode) direction was working fine -- and I'm usually debugging on the peer actually running tailscale-rs, where the remote is a go tailscaled node. 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.

@dylan-tailscale dylan-tailscale left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

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
npry force-pushed the npry/disco.fix-ep-encoding branch from 1b6a6d6 to 1330438 Compare September 15, 2026 20:17
@npry
npry merged commit 1330438 into main Sep 15, 2026
23 checks passed
@npry
npry deleted the npry/disco.fix-ep-encoding branch September 15, 2026 20:31
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