fix(region): ipv6 free ip (#19418)

This commit is contained in:
屈轩
2024-02-02 17:15:18 +08:00
committed by GitHub
parent 629ca22509
commit 74932360b5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -392,7 +392,7 @@ func (manager *SGuestnetworkManager) newGuestNetwork(
}
}
ip6Addr, err := network.GetFreeIP(ctx, userCred, addrTable, recentAddrTable, address, allocDir, reserved, api.AddressTypeIPv6)
ip6Addr, err := network.GetFreeIP(ctx, userCred, addrTable, recentAddrTable, address6, allocDir, reserved, api.AddressTypeIPv6)
if err != nil {
return nil, errors.Wrap(err, "GetFreeIPv6")
}
+1 -1
View File
@@ -341,7 +341,7 @@ func (snet *SNetwork) getFreeIP6(addrTable map[string]bool, recentUsedAddrTable
return "", errors.Wrap(err, "NewIPV6Addr")
}
if !iprange.Contains(candIP) {
return "", httperrors.NewInputParameterError("candidate %s out of range", candidate)
return "", httperrors.NewInputParameterError("candidate %s out of range %s", candidate, iprange.String())
}
if _, ok := addrTable[candidate]; !ok {
return candidate, nil