dns: drop CNAME for primary name server

This commit is contained in:
Frank Schroeder 2017-08-07 11:09:04 +02:00
parent 7f34dc08a5
commit 76b2538915
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 0 additions and 17 deletions

View File

@ -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.<domain>" 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: