On some platform the IPv6 loopback address is not suitable to assign a name. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/165710043
@@ -76,6 +76,9 @@ func routableIP(network string, ip net.IP) net.IP {
return ip
}
case "ip6":
+ if ip.IsLoopback() { // addressing scope of the loopback address depends on each implementation
+ return nil
+ }
if ip := ip.To16(); ip != nil && ip.To4() == nil {