Merge pull request #1222 from 42wim/node-aaaa-queries

Allow AAAA queries for nodeLookup
pull/1224/head
Ryan Breen 9 years ago
commit 34f98f7bdf

@ -352,9 +352,9 @@ INVALID:
// nodeLookup is used to handle a node query // nodeLookup is used to handle a node query
func (d *DNSServer) nodeLookup(network, datacenter, node string, req, resp *dns.Msg) { 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 qType := req.Question[0].Qtype
if qType != dns.TypeANY && qType != dns.TypeA { if qType != dns.TypeANY && qType != dns.TypeA && qType != dns.TypeAAAA {
return return
} }

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

Loading…
Cancel
Save