Commit f262eed9 authored by Michael Hendricks's avatar Michael Hendricks Committed by Brad Fitzpatrick
Browse files

[release-branch.go1.13] 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 #34662
Updates #34660

Change-Id: I56f9d21e5342d07e7d843d253267e93a29707904
Reviewed-on: https://go-review.googlesource.com/c/go/+/198460


Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit f0e940eb)
Reviewed-on: https://go-review.googlesource.com/c/go/+/198489


Reviewed-by: default avatarMichael Hendricks <michael@ndrix.org>
Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
parent 8a6cd7a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment