mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): ipv6 free ip (#19418)
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user