Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

detect ipv6

chrisluf00ae727b7f7
diff --git a/weed/util/network.go b/weed/util/network.go
index b801ec6825..328808dbcc 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() {