]> Cypherpunks repositories - gostls13.git/commit
net: don't return DNS query results including the second best records unconditionally
authorMikio Hara <mikioh.mikioh@gmail.com>
Tue, 9 Jun 2015 08:30:00 +0000 (17:30 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Tue, 28 Jul 2015 08:39:26 +0000 (08:39 +0000)
commit6aa48a9a0b8a7789c5ee4019d3eb50089c611f33
tree10f6c856782c64bc63ebbaa8a70e24c2d5e4d8fc
parentd0729a6edebcaae1ab6554244fc6ef2ff36609bf
net: don't return DNS query results including the second best records unconditionally

This change prevents DNS query results using domain search list
overtaking results not using the list unconditionally, which only
happens when using builtin DNS stub resolver.

The previous internal lookup function lookup is split into lookup and
goLookupIPOrder for iteration over a set of names: FQDN or absolute
FQDN, with domain label suffixes in search list, without domain label
suffixes, and for concurrent A and AAAA record queries.

Fixes #11081.

Change-Id: I9ff0640f69276e372d97e709b149ed5b153e8601
Reviewed-on: https://go-review.googlesource.com/10836
Reviewed-by: Russ Cox <rsc@golang.org>
src/net/dnsclient.go
src/net/dnsclient_unix.go
src/net/dnsclient_unix_test.go