mirror of
https://github.com/gluster/glusterd2.git
synced 2026-02-05 12:45:38 +01:00
Support ipv6-only hosts
This commit is contained in:
committed by
Sheena Artrip
parent
624c6bce5b
commit
c9beeb8441
@@ -323,6 +323,9 @@ func GetLocalIP() (string, error) {
|
||||
if ipnet.IP.To4() != nil {
|
||||
return ipnet.IP.String(), nil
|
||||
}
|
||||
if ipnet.IP.To16() != nil {
|
||||
return ipnet.IP.String(), nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return "", errors.ErrIPAddressNotFound
|
||||
|
||||
Reference in New Issue
Block a user