]> Cypherpunks repositories - gostls13.git/commit
net: fix handling of Conns created by Resolver.Dial
authorIan Gudger <igudger@google.com>
Tue, 24 Jul 2018 23:19:19 +0000 (16:19 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 24 Jul 2018 23:54:08 +0000 (23:54 +0000)
commit5f5402b72313463a25c1bcacd559254834690d7e
tree7854a7efce7c66138b7ae1b08771a57880f9b07e
parentc1e1e882d2a1e474e21bc44edf26e3fb5ab87ebc
net: fix handling of Conns created by Resolver.Dial

The DNS client in net is documented to treat Conns returned by
Resolver.Dial which implement PacketConn as UDP and those which don't as
TCP regardless of what was requested. golang.org/cl/37879 changed the
DNS client to assume that the Conn returned by Resolver.Dial was the
requested type which broke compatibility.

Fixes #26573
Updates #16218

Change-Id: Idf4f073a4cc3b1db36a3804898df206907f9c43c
Reviewed-on: https://go-review.googlesource.com/125735
Run-TryBot: Ian Gudger <igudger@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/dnsclient_unix.go
src/net/dnsclient_unix_test.go