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: LookupAddr doesn't work with literal IPv6 address w/ zone identifier when GODEBUG=netdns=cgo #12241

Closed
mikioh opened this issue Aug 20, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@mikioh
Copy link
Contributor

commented Aug 20, 2015

For example, on a node which keeps "fe80::1%lo0 localhost" line in /etc/hosts,

package main

import (
    "fmt"
    "net"
)

func main() {
    ptr, err := net.LookupAddr("fe80::1%lo0")
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(ptr)
}

results in

$ GODEBUG=netdns=cgo go run x.go 
lookup fe80::1%lo0: invalid address

$ GODEBUG=netdns=go go run x.go 
[localhost]

@mikioh mikioh added this to the Go1.6 milestone Aug 20, 2015

@gopherbot

This comment has been minimized.

Copy link

commented Nov 27, 2015

CL https://golang.org/cl/17215 mentions this issue.

@mikioh mikioh closed this in 8854bdb Dec 4, 2015

@golang golang locked and limited conversation to collaborators Dec 14, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.