Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NS records and A records for each server. Constructs ns host name… #3353

Merged
merged 14 commits into from
Aug 8, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
dns: drop CNAME for primary name server
  • Loading branch information
magiconair committed Aug 7, 2017
commit 76b2538915cc9528043bbcbee8f2213c2841b842
17 changes: 0 additions & 17 deletions agent/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down