aboutsummaryrefslogtreecommitdiff
path: root/src/net/dnsclient_unix.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2018-03-15 09:27:29 +0300
committerBrad Fitzpatrick <bradfitz@golang.org>2018-03-16 07:02:38 +0000
commit0b20aece1aa4782070660a80dc4cf87c183533c9 (patch)
treec2c5f2dc5752f6a98632d0888460d9253d6245f5 /src/net/dnsclient_unix.go
parent86a338960df4ffd88f49aa96a4ad4c14fee51432 (diff)
downloadgo-0b20aece1aa4782070660a80dc4cf87c183533c9.tar.gz
go-0b20aece1aa4782070660a80dc4cf87c183533c9.zip
net: make Resolver.PreferGo work more as documented
Fixes #24393 Change-Id: I8bcee34cdf30472663d866ed6056301d8445215c Reviewed-on: https://go-review.googlesource.com/100875 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/net/dnsclient_unix.go')
-rw-r--r--src/net/dnsclient_unix.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/dnsclient_unix.go b/src/net/dnsclient_unix.go
index d2a6dc4a811..7ca5d6027b5 100644
--- a/src/net/dnsclient_unix.go
+++ b/src/net/dnsclient_unix.go
@@ -524,7 +524,7 @@ func goLookupIPFiles(name string) (addrs []IPAddr) {
// goLookupIP is the native Go implementation of LookupIP.
// The libc versions are in cgo_*.go.
func (r *Resolver) goLookupIP(ctx context.Context, host string) (addrs []IPAddr, err error) {
- order := systemConf().hostLookupOrder(host)
+ order := systemConf().hostLookupOrder(r, host)
addrs, _, err = r.goLookupIPCNAMEOrder(ctx, host, order)
return
}
@@ -676,7 +676,7 @@ func (r *Resolver) goLookupIPCNAMEOrder(ctx context.Context, name string, order
// goLookupCNAME is the native Go (non-cgo) implementation of LookupCNAME.
func (r *Resolver) goLookupCNAME(ctx context.Context, host string) (string, error) {
- order := systemConf().hostLookupOrder(host)
+ order := systemConf().hostLookupOrder(r, host)
_, cname, err := r.goLookupIPCNAMEOrder(ctx, host, order)
return cname.String(), err
}