agent: pass through CNAME types for service resolution

This commit is contained in:
Ryan Uber 2015-04-13 18:22:41 -07:00
parent 6f0b1a3b46
commit 116f8b9131
1 changed files with 2 additions and 5 deletions

View File

@ -426,13 +426,10 @@ func (d *DNSServer) formatNodeRecord(node *structs.Node, addr, qName string, qTy
// Recurse
more := d.resolveCNAME(cnRec.Target)
extra := 0
MORE_REC:
for _, rr := range more {
for extra, rr := range more {
switch rr.Header().Rrtype {
case dns.TypeA:
fallthrough
case dns.TypeAAAA:
case dns.TypeCNAME, dns.TypeA, dns.TypeAAAA:
records = append(records, rr)
extra++
if extra == maxRecurseRecords {