Skip to content

Commit

Permalink
Don't assume that A RRs will be first
Browse files Browse the repository at this point in the history
Maybe
fixes #202
  • Loading branch information
jedisct1 committed Mar 2, 2018
1 parent 2c7513a commit 4e671cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dnscrypt-proxy/xtransport.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (xTransport *XTransport) Fetch(method string, url *url.URL, accept string,
var foundIP *string
for _, answer := range in.Answer {
if answer.Header().Rrtype == dns.TypeA {
foundIPx := in.Answer[0].(*dns.A).A.String()
foundIPx := answer.(*dns.A).A.String()
foundIP = &foundIPx
break
}
Expand Down

0 comments on commit 4e671cf

Please sign in to comment.