• Christopher Wedgwood's avatar
    net: name-based destination address selection · 50effb65
    Christopher Wedgwood authored
    getaddrinfo() orders the addresses according to RFC 3484.
    
    This means when IPv6 is working on a host we get results like:
        []string = {"2001:4810::110", "66.117.47.214"}
    
    and when it's not working we get:
        []string = {"66.117.47.214", "2001:4810::110"}
    
    thus can drop firstFavoriteAddr.
    
    This also means /etc/gai.conf works on relevant systems.
    
    R=rsc, mikioh.mikioh
    CC=golang-dev
    https://golang.org/cl/4557058
    50effb65
ipsock.go 7.67 KB