Browse Source

Merge pull request #2310 from nivekuil/ipv6

Detect ipv6 addresses
pull/2321/head
Chris Lu 3 years ago
committed by GitHub
parent
commit
2348e8d8da
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      weed/util/network.go

2
weed/util/network.go

@ -24,7 +24,7 @@ func DetectedHostAddress() string {
for _, a := range addrs {
if ipNet, ok := a.(*net.IPNet); ok && !ipNet.IP.IsLoopback() {
if ipNet.IP.To4() != nil {
if ipNet.IP.To4() != nil || ipNet.IP.To16() != nil {
return ipNet.IP.String()
}
}

Loading…
Cancel
Save