• Ian Gudger's avatar
    net: fix handling of Conns created by Resolver.Dial · 5f5402b7
    Ian Gudger authored
    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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    5f5402b7
dnsclient_unix.go 20.3 KB