Skip to content

Commit

Permalink
Merge pull request #1222 from 42wim/node-aaaa-queries
Browse files Browse the repository at this point in the history
Allow AAAA queries for nodeLookup
  • Loading branch information
ryanbreen committed Sep 8, 2015
2 parents 446c640 + 0bc4d93 commit 34f98f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions command/agent/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion command/agent/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 34f98f7

Please sign in to comment.