since dns.TXT is an external dependency, it is safer to add keys to the fields to avoid some potential ordering issues if changes in this field occur with upstream

This commit is contained in:
Ali Abbas 2014-12-06 13:13:35 +01:00
parent fc73a5a53e
commit d73e1cae85
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ func (d *DNSServer) handleTest(resp dns.ResponseWriter, req *dns.Msg) {
m.Authoritative = true m.Authoritative = true
m.RecursionAvailable = true m.RecursionAvailable = true
header := dns.RR_Header{Name: q.Name, Rrtype: dns.TypeTXT, Class: dns.ClassINET, Ttl: 0} header := dns.RR_Header{Name: q.Name, Rrtype: dns.TypeTXT, Class: dns.ClassINET, Ttl: 0}
txt := &dns.TXT{header, []string{"ok"}} txt := &dns.TXT{Hdr: header, Txt: []string{"ok"}}
m.Answer = append(m.Answer, txt) m.Answer = append(m.Answer, txt)
d.addSOA(consulDomain, m) d.addSOA(consulDomain, m)
if err := resp.WriteMsg(m); err != nil { if err := resp.WriteMsg(m); err != nil {