From e1bcbc6832c6f528e379529e6b78c773dacee067 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Mon, 7 Aug 2017 11:09:04 +0200 Subject: [PATCH] dns: drop CNAME for primary name server --- agent/dns.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/agent/dns.go b/agent/dns.go index 3245a4ea8..279e1144a 100644 --- a/agent/dns.go +++ b/agent/dns.go @@ -216,23 +216,6 @@ func (d *DNSServer) handleQuery(resp dns.ResponseWriter, req *dns.Msg) { m.Answer = append(m.Answer, d.soa()) m.Ns = append(m.Ns, ns...) m.Extra = append(m.Extra, glue...) - - // add CNAMEs for "ns." to the Extra - // section to make the MNAME entry in the SOA - // record resolvable - for _, rr := range ns { - cname := &dns.CNAME{ - Hdr: dns.RR_Header{ - Name: "ns." + d.domain, - Rrtype: dns.TypeCNAME, - Class: dns.ClassINET, - Ttl: uint32(d.config.NodeTTL / time.Second), - }, - Target: rr.(*dns.NS).Ns, - } - m.Extra = append(m.Extra, cname) - } - m.SetRcode(req, dns.RcodeSuccess) case dns.TypeNS: