From 19492650d4781ae6c3b4ace9d166274069229dc1 Mon Sep 17 00:00:00 2001 From: Juan Font Alonso Date: Sat, 2 Oct 2021 13:03:08 +0200 Subject: [PATCH] Fixed error on assign --- api.go | 2 +- cmd/headscale/cli/utils.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 }