diff options
| author | chrislu <chris.lu@gmail.com> | 2025-10-30 08:58:54 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-10-30 16:13:54 -0700 |
| commit | a6da3eb77092b9744bde2394e83809cf6cfc33cb (patch) | |
| tree | 6201de9a0052bd462f4369594ab4fc67c8ab1deb /weed | |
| parent | db35159a41e0f098c25fed2ea06255ae85503fc5 (diff) | |
| download | seaweedfs-a6da3eb77092b9744bde2394e83809cf6cfc33cb.tar.xz seaweedfs-a6da3eb77092b9744bde2394e83809cf6cfc33cb.zip | |
server can start when no network for local dev
Diffstat (limited to 'weed')
| -rw-r--r-- | weed/util/network.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/util/network.go b/weed/util/network.go index 69559b5f0..b801ec682 100644 --- a/weed/util/network.go +++ b/weed/util/network.go @@ -44,7 +44,11 @@ func selectIpV4(netInterfaces []net.Interface, isIpV4 bool) string { } } else { if ipNet.IP.To16() != nil { - return ipNet.IP.String() + // Filter out link-local IPv6 addresses (fe80::/10) + // They require zone identifiers and are not suitable for server binding + if !ipNet.IP.IsLinkLocalUnicast() { + return ipNet.IP.String() + } } } } |
