mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-07 04:27:49 +01:00
detect ipv6
This commit is contained in:
1 parent
d745e6e41d
commit
f00ae727b7
1 file changed
+1
-1
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user