Allow AAAA queries for nodeLookup

This commit is contained in:
Wim 2015-09-08 15:54:13 +02:00
parent 446c640c17
commit 0bc4d9322e
2 changed files with 3 additions and 3 deletions

View File

@ -352,9 +352,9 @@ INVALID:
// nodeLookup is used to handle a node query
func (d *DNSServer) nodeLookup(network, datacenter, node string, req, resp *dns.Msg) {
// Only handle ANY and A type requests
// Only handle ANY, A and AAAA type requests
qType := req.Question[0].Qtype
if qType != dns.TypeANY && qType != dns.TypeA {
if qType != dns.TypeANY && qType != dns.TypeA && qType != dns.TypeAAAA {
return
}

View File

@ -293,7 +293,7 @@ func TestDNS_NodeLookup_AAAA(t *testing.T) {
}
m := new(dns.Msg)
m.SetQuestion("bar.node.consul.", dns.TypeANY)
m.SetQuestion("bar.node.consul.", dns.TypeAAAA)
c := new(dns.Client)
addr, _ := srv.agent.config.ClientListener("", srv.agent.config.Ports.DNS)