mirror of https://github.com/hashicorp/consul
agent: pass through CNAME types for service resolution
parent
6f0b1a3b46
commit
116f8b9131
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue