Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: Dial, Listen and ResolveAddr fail when the ipv6 entry in /etc/hosts has a zone identifier #8243

mikioh opened this issue Jun 19, 2014 · 5 comments


Copy link

@mikioh mikioh commented Jun 19, 2014

According to issue #8235, all connection setup and resolveaddr functions fail when the
target is has an ipv6 scoped addressing zone identifier. For example,

localhost fe80::1%lo0
livingroom fe80::2%en1
garage fe80::2%en2

Listen("tcp6", "localhost:0)"
Dial("tcp6", "livingloom:1234")
ResolveTCPAddr("tcp", "garage:http")
Copy link

@ianlancetaylor ianlancetaylor commented Jun 19, 2014

Comment 1:

Labels changed: added repo-main, release-go1.4.

Copy link
Contributor Author

@mikioh mikioh commented Jun 20, 2014

Comment 2:

To fix this issue, we need to handle zone identifier appropriately at;
- cgoLookupIPCNAME in cgo_unix.go, fortunately getaddrinfo returns ipv6 address with
zone identifier,
- readHosts in hosts.go, it doesn't parse ipv6 address with zone identifier correctly,
- resolveInternetAddr in ipsock.go and lookupIP in lookup.go, for now both functions
drop ipv6 zone identifier.
Copy link

@rsc rsc commented Sep 16, 2014

Comment 3:

Too late for 1.4.

Labels changed: added release-go1.5, removed release-go1.4.

Status changed to Accepted.

Copy link
Contributor Author

@mikioh mikioh commented Sep 16, 2014

Comment 4:

Labels changed: added release-none, removed release-go1.5.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc removed release-none labels Apr 10, 2015
Copy link

@gopherbot gopherbot commented May 21, 2015

CL mentions this issue.

@mikioh mikioh closed this in 9378493 Jun 2, 2015
@mikioh mikioh modified the milestones: Go1.5, Unplanned Jun 2, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.