Browse Source

dns: drop CNAME for primary name server

pull/3353/head
Frank Schroeder 7 years ago
parent
commit
76b2538915
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
  1. 17
      agent/dns.go

17
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.<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:

Loading…
Cancel
Save