]> Cypherpunks repositories - gostls13.git/commit
net: name-based destination address selection
authorChristopher Wedgwood <cw@f00f.org>
Tue, 31 May 2011 15:40:11 +0000 (11:40 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 31 May 2011 15:40:11 +0000 (11:40 -0400)
commit50effb654cf3bf7fdfb49898e765db444dfd619a
tree87b3a38ae0097e8b301d47e5c9b04d25de2eb149
parent91cc1e6b778880e7a8f85d057a51fbb0cd23d7c8
net: name-based destination address selection

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
src/pkg/net/iprawsock.go
src/pkg/net/ipsock.go