Skip to content

Commit

Permalink
Machine Explorer: Exclude DNS root label from address (#203)
Browse files Browse the repository at this point in the history
The trailing period (root label) was removed from the DNS name in
(#181), but should have also been removed from the label which is
derived from the DNS name.

Signed-off-by: Tyler Smalley <tyler@tailscale.com>
(cherry picked from commit 0b7a1d2)
  • Loading branch information
tylersmalley committed Aug 23, 2023
1 parent d101732 commit 4ff367b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsrelay/handler/get_peers.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (h *handler) getPeers(ctx context.Context, body io.Reader) (*getPeersRespon
// if the DNSName does not end with the magic DNS suffix, it is an external peer
isExternal := !strings.HasSuffix(dnsNameNoRootLabel, st.CurrentTailnet.MagicDNSSuffix)

addr := p.DNSName
addr := dnsNameNoRootLabel
if addr == "" && len(p.TailscaleIPs) > 0 {
addr = p.TailscaleIPs[0].String()
}
Expand Down

0 comments on commit 4ff367b

Please sign in to comment.