diff --git a/api.go b/api.go index be087eb1..84754e41 100644 --- a/api.go +++ b/api.go @@ -249,7 +249,7 @@ func (h *Headscale) getMapResponse(mKey wgkey.Key, req tailcfg.MapRequest, m Mac if err != nil { return nil, err } - dnsConfig := h.cfg.DNSConfig.Clone() + dnsConfig = h.cfg.DNSConfig.Clone() for _, ns := range *namespaces { dnsConfig.Domains = append(dnsConfig.Domains, fmt.Sprintf("%s.%s", ns.Name, h.cfg.BaseDomain)) } diff --git a/cmd/headscale/cli/utils.go b/cmd/headscale/cli/utils.go index bff7693d..53f96055 100644 --- a/cmd/headscale/cli/utils.go +++ b/cmd/headscale/cli/utils.go @@ -118,6 +118,7 @@ func GetDNSConfig() (*tailcfg.DNSConfig, string) { } else { baseDomain = "headscale.net" // does not really matter when MagicDNS is not enabled } + return dnsConfig, baseDomain }