From 7090f7fffc2c6ea67d0ff9e1adb582a6e87db468 Mon Sep 17 00:00:00 2001 From: Nick Khyl Date: Fri, 18 Apr 2025 16:52:55 -0500 Subject: [PATCH] ipn/ipnlocal: use MagicDNSName of the current profile instead of generating a full ipnstate.Status Both are populated from the current netmap's MagicDNSSuffix. But building a full ipnstate.Status (with peers!) is expensive and unnecessary. Updates #cleanup Signed-off-by: Nick Khyl --- ipn/ipnlocal/serve.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipn/ipnlocal/serve.go b/ipn/ipnlocal/serve.go index 638b26a36..cc0d219d8 100644 --- a/ipn/ipnlocal/serve.go +++ b/ipn/ipnlocal/serve.go @@ -632,7 +632,7 @@ func (b *LocalBackend) getServeHandler(r *http.Request) (_ ipn.HTTPHandlerView, hostname := r.Host if r.TLS == nil { - tcd := "." + b.Status().CurrentTailnet.MagicDNSSuffix + tcd := "." + b.CurrentProfile().NetworkProfile().MagicDNSName if host, _, err := net.SplitHostPort(hostname); err == nil { hostname = host }