agent: pass through CNAME types for service resolution

pull/862/head
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 // Recurse
more := d.resolveCNAME(cnRec.Target) more := d.resolveCNAME(cnRec.Target)
extra := 0
MORE_REC: MORE_REC:
for _, rr := range more { for extra, rr := range more {
switch rr.Header().Rrtype { switch rr.Header().Rrtype {
case dns.TypeA: case dns.TypeCNAME, dns.TypeA, dns.TypeAAAA:
fallthrough
case dns.TypeAAAA:
records = append(records, rr) records = append(records, rr)
extra++ extra++
if extra == maxRecurseRecords { if extra == maxRecurseRecords {