Skip to content

Commit 4e671cf

Browse files
committed
Don't assume that A RRs will be first
Maybe fixes #202
1 parent 2c7513a commit 4e671cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dnscrypt-proxy/xtransport.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func (xTransport *XTransport) Fetch(method string, url *url.URL, accept string,
155155
var foundIP *string
156156
for _, answer := range in.Answer {
157157
if answer.Header().Rrtype == dns.TypeA {
158-
foundIPx := in.Answer[0].(*dns.A).A.String()
158+
foundIPx := answer.(*dns.A).A.String()
159159
foundIP = &foundIPx
160160
break
161161
}

0 commit comments

Comments
 (0)