]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.16] net: filter bad names from Lookup functions instead of hard...
authorRoland Shoemaker <roland@golang.org>
Fri, 2 Jul 2021 17:25:49 +0000 (10:25 -0700)
committerRoland Shoemaker <roland@golang.org>
Thu, 8 Jul 2021 19:17:45 +0000 (19:17 +0000)
commitfb052db03a37deb29afc5abbbcd141e5299280df
tree5369a603dc23ad9c62981ef58f81814a5c7b424c
parenta91ed836c53fcd64697b07659a8930c0a7140759
[release-branch.go1.16] net: filter bad names from Lookup functions instead of hard failing

Instead of hard failing on a single bad record, filter the bad records
and return anything valid. This only applies to the methods which can
return multiple records, LookupMX, LookupNS, LookupSRV, and LookupAddr.

When bad results are filtered out, also return an error, indicating
that this filtering has happened.

Updates #46241
Updates #46979
Fixes #46999

Change-Id: I6493e0002beaf89f5a9795333a93605abd30d171
Reviewed-on: https://go-review.googlesource.com/c/go/+/332549
Trust: Roland Shoemaker <roland@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
(cherry picked from commit 296ddf2a936a30866303a64d49bc0e3e034730a8)
Reviewed-on: https://go-review.googlesource.com/c/go/+/333330
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
src/net/dnsclient_unix_test.go
src/net/lookup.go