Browse Source

detect ipv6

pull/7418/head
chrislu 4 days ago
parent
commit
f00ae727b7
  1. 2
      weed/util/network.go

2
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() {

Loading…
Cancel
Save