diff --git a/package.json b/package.json index 1631d5d..53c99ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cosmos-server", - "version": "0.16.0-unstable2", + "version": "0.16.0-unstable3", "description": "", "main": "test-server.js", "bugs": { diff --git a/src/utils/utils.go b/src/utils/utils.go index 59549af..5ce8d59 100644 --- a/src/utils/utils.go +++ b/src/utils/utils.go @@ -840,7 +840,10 @@ func ListIps(skipNebula bool) ([]string, error) { // Check if the address is an IP address and not a mask. if ipnet, ok := addr.(*osnet.IPNet); ok && !ipnet.IP.IsLoopback() { if ipnet.IP.To4() != nil { - result = append(result, ipnet.IP.String()) + // if not duplicate + if !StringArrayContains(result, ipnet.IP.String()) { + result = append(result, ipnet.IP.String()) + } } else if ipnet.IP.To16() != nil { // ignore for now }