Skip to content

Commit 4ff367b

Browse files
committed
Machine Explorer: Exclude DNS root label from address (#203)
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 <[email protected]> (cherry picked from commit 0b7a1d2)
1 parent d101732 commit 4ff367b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tsrelay/handler/get_peers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func (h *handler) getPeers(ctx context.Context, body io.Reader) (*getPeersRespon
115115
// if the DNSName does not end with the magic DNS suffix, it is an external peer
116116
isExternal := !strings.HasSuffix(dnsNameNoRootLabel, st.CurrentTailnet.MagicDNSSuffix)
117117

118-
addr := p.DNSName
118+
addr := dnsNameNoRootLabel
119119
if addr == "" && len(p.TailscaleIPs) > 0 {
120120
addr = p.TailscaleIPs[0].String()
121121
}

0 commit comments

Comments
 (0)