]> Cypherpunks repositories - gostls13.git/commit
net: LookupHost and Resolve{TCP,UDP,IP}Addr should use zone from getaddrinfo
authorAndrew Pilloud <andrewpilloud@igneoussystems.com>
Fri, 13 Feb 2015 04:24:47 +0000 (20:24 -0800)
committerMikio Hara <mikioh.mikioh@gmail.com>
Sun, 8 Mar 2015 09:58:11 +0000 (09:58 +0000)
commitf00362b9ecf9fbca6f099493a4e8d1c6a030dee3
tree034ac1024dc1e7d73ed2cb52d483e1f532b14859
parentcbc854a7993accd581c3ad2a58cb51788372e29c
net: LookupHost and Resolve{TCP,UDP,IP}Addr should use zone from getaddrinfo

The unix and windows getaddrinfo calls return a zone with IPv6
addresses. IPv6 link-local addresses returned are only valid on the
given zone. When the zone is dropped, connections to the address
will fail. This patch replaces IP with IPAddr in several internal
resolver functions, and plumbs through the zone.

Change-Id: Ifea891654f586f15b76988464f82e04a42ccff6d
Reviewed-on: https://go-review.googlesource.com/5851
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
src/net/cgo_stub.go
src/net/cgo_unix.go
src/net/dnsclient_unix.go
src/net/ipsock.go
src/net/ipsock_test.go
src/net/lookup.go
src/net/lookup_plan9.go
src/net/lookup_stub.go
src/net/lookup_unix.go
src/net/lookup_windows.go