diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2021-09-05 10:56:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-05 10:56:44 -0700 |
| commit | 2348e8d8da2d452c31f6f7a6a9a5eb5a30e19345 (patch) | |
| tree | 6625a7dae473ebea9ded4901526d93a061be7898 | |
| parent | bdefdee4e622058d9c2ebe9d2b495ff0625a420f (diff) | |
| parent | 0fe9d2997b6236cf488195856e7c5a87f57bc720 (diff) | |
| download | seaweedfs-2348e8d8da2d452c31f6f7a6a9a5eb5a30e19345.tar.xz seaweedfs-2348e8d8da2d452c31f6f7a6a9a5eb5a30e19345.zip | |
Merge pull request #2310 from nivekuil/ipv6
Detect ipv6 addresses
| -rw-r--r-- | weed/util/network.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/util/network.go b/weed/util/network.go index 55a123667..a3ea82330 100644 --- a/weed/util/network.go +++ b/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() } } |
