]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.12] net: avoid an infinite loop in LookupAddr
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 2 Oct 2019 20:59:27 +0000 (20:59 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 3 Oct 2019 02:07:10 +0000 (02:07 +0000)
commit273d946ec451a0722d21ac12494be7e367bbaac6
tree1de6e4e5d4d50c585ccffb7a77acb02f1440c21e
parent2af114ab22fca22107a8ce5ff9742abecd41521e
[release-branch.go1.12] net: avoid an infinite loop in LookupAddr

If a request for a PTR record returned a response with a non-PTR
answer, goLookupPTR would loop forever.  Skipping non-PTR answers
guarantees progress through the DNS response.

Fixes #34661
Updates #34660

Change-Id: Ib5e5263243bc34b9e2f85aa2b913c9cd50dbcaa5
Reviewed-on: https://go-review.googlesource.com/c/go/+/198497
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
src/net/dnsclient_unix.go
src/net/dnsclient_unix_test.go