From f00ae727b7f7cc85b5312e779f81af9e3eb931f0 Mon Sep 17 00:00:00 2001 From: chrislu Date: Fri, 31 Oct 2025 11:58:10 -0700 Subject: [PATCH] detect ipv6 --- weed/util/network.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() {