summaryrefslogtreecommitdiff
path: root/src/net/cgo_unix.go
Commit message (Collapse)AuthorAgeFilesLines
* net: fix parsing literal IPv6 address with zone identifier when using cgoMikio Hara2015-12-041-4/+8
| | | | | | | | | | | | | Parsing literal IPv6 address with zone identifier is already supported when not using cgo. This change enables it when using cgo too. Fixes #12241. Change-Id: I3ed78c9e750e75eff0dae76ba8608df39503cf85 Reviewed-on: https://go-review.googlesource.com/17215 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
* net: force LookupAddr results to be rooted DNS paths even in the case of ↵Mikio Hara2015-11-281-6/+1
| | | | | | | | | | | | | | | | | local source The builtin name resolver using various resolution techniques is a bit complicated and we sometimes fotget to take care of all the go and cgo code paths and exchanging information to local and remote sources. This change makes LookupAddr return absolute domain names even in the case of local source. Updates #12189. Fixes #12240. Change-Id: Icdd3375bcddc7f5d4d3b24f134d93815073736fc Reviewed-on: https://go-review.googlesource.com/17216 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* net: force LookupAddr results to be rooted DNS paths when using cgoRuss Cox2015-08-191-0/+5
| | | | | | | | | | | | | | | | | | | | Go 1.4 and before have always returned DNS names with a trailing dot for reverse lookups, as they do for basically all other routines returning DNS names. Go 1.4 and before always implemented LookupAddr using pure Go (not C library calls). Go 1.5 added the ability to make a C library call to implement LookupAddr. Unfortunately the C library call returns a DNS name without a trailing dot (an unrooted name), meaning that if turn off cgo during make.bash then you still get the rooted name but with cgo on you get an unrooted name. The unrooted name is inconsistent with the pure Go implementation and with all previous Go releases, so change it to a rooted name. Fixes #12189. Change-Id: I3d6b72277c121fe085ea6af30e5fe8019fc490ad Reviewed-on: https://go-review.googlesource.com/13697 Reviewed-by: Rob Pike <r@golang.org>
* net: allow LookupAddr to use getnameinfo when cgo is enabledMikio Hara2015-06-171-0/+66
| | | | | | | | | | | This change allows LookupAddr to use getnameinfo through cgo for working together with various name services other than DNS. Fixes #7855. Change-Id: I5b3b4aefe3d1b904541c3350865734d8cbb1c1c4 Reviewed-on: https://go-review.googlesource.com/3420 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* net: add cgo support for SolarisAram Hăvărneanu2015-05-061-1/+1
| | | | | | | Change-Id: Ib66bebd418d97f38956970f93e69aa41e7c55523 Reviewed-on: https://go-review.googlesource.com/8262 Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
* net: fix inconsistent error values on LookupMikio Hara2015-04-211-8/+6
| | | | | | | | | | | This change fixes inconsistent error values on Lookup{Addr,CNAME,Host,IP.MX,NS,Port,SRV,TXT}. Updates #4856. Change-Id: I059bc8ffb96ee74dff8a8c4e8e6ae3e4a462a7ef Reviewed-on: https://go-review.googlesource.com/9108 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* net: clean up cgoMikio Hara2015-04-171-39/+54
| | | | | | | | | | | This change adds a type addrinfoErrno to represent getaddrinfo, getnameinfo-specific errors, and uses it in cgo-based lookup functions. Also retags cgo files for clarification and does minor cleanup. Change-Id: I6db7130ad7bf35bbd4e8839a97759e1364c43828 Reviewed-on: https://go-review.googlesource.com/9020 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* net: LookupHost and Resolve{TCP,UDP,IP}Addr should use zone from getaddrinfoAndrew Pilloud2015-03-081-4/+6
| | | | | | | | | | | | 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>
* build: move package sources from src/pkg to srcRuss Cox2014-09-081-0/+164
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.