diff options
| author | chrislu <chris.lu@gmail.com> | 2025-10-31 11:58:10 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-10-31 11:58:10 -0700 |
| commit | f00ae727b7f7cc85b5312e779f81af9e3eb931f0 (patch) | |
| tree | ecb24643cbe29af34b0b9ce91e9347a21676e6db | |
| parent | d745e6e41ddf53391b9bb1fc1ee387ead075c10c (diff) | |
| download | seaweedfs-f00ae727b7f7cc85b5312e779f81af9e3eb931f0.tar.xz seaweedfs-f00ae727b7f7cc85b5312e779f81af9e3eb931f0.zip | |
detect ipv6
| -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 b801ec682..328808dbc 100644 --- a/weed/util/network.go +++ b/weed/util/network.go @@ -43,7 +43,7 @@ func selectIpV4(netInterfaces []net.Interface, isIpV4 bool) string { return ipNet.IP.String() } } else { - if ipNet.IP.To16() != nil { + if ipNet.IP.To4() == nil && ipNet.IP.To16() != nil { // Filter out link-local IPv6 addresses (fe80::/10) // They require zone identifiers and are not suitable for server binding if !ipNet.IP.IsLinkLocalUnicast() { |
