diff --git a/coolDns.go b/coolDns.go index c753141..3bfb0da 100644 --- a/coolDns.go +++ b/coolDns.go @@ -172,8 +172,9 @@ func createServer(zones []zone, config config, aclList map[string]*net.IPNet) *d searchDomain := "*." + dns.Fqdn(strings.Join(parts, ".")) foundDomain := rrs[searchDomain] for _, rr := range foundDomain { - rr.Header().Name = q.Name - m.Answer = append(m.Answer, rr) + newRR := rr + newRR.Header().Name = q.Name + m.Answer = append(m.Answer, newRR) } }