/install/get_default_addresses -- Remove subnet suffix from addresses
This commit is contained in:
parent
d97c426646
commit
c14aff3dba
|
@ -737,6 +737,13 @@ func handleGetDefaultAddresses(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
data.Interfaces = make(map[string]interface{})
|
data.Interfaces = make(map[string]interface{})
|
||||||
for _, iface := range ifaces {
|
for _, iface := range ifaces {
|
||||||
|
for i := range iface.Addresses {
|
||||||
|
ip, _, err := net.ParseCIDR(iface.Addresses[i])
|
||||||
|
if err != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
iface.Addresses[i] = ip.String()
|
||||||
|
}
|
||||||
data.Interfaces[iface.Name] = iface
|
data.Interfaces[iface.Name] = iface
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue