From 08e70f8f94579a4bde71d7e4ab55a6493917763c Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 23 Dec 2020 12:57:12 +0100 Subject: [PATCH] fixed wildcard header --- coolDns.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) } }