Skip to content

Commit f18eebf

Browse files
authored
server: fix check for ipv6 range overlap (#6705)
Fixes incorrect check for verifying IPv6 ranges overlap. This causes the inability to add multiple IPv6 ranges.
1 parent 1d20fcf commit f18eebf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4643,7 +4643,7 @@ public Vlan createVlanAndPublicIpRange(final long zoneId, final long networkId,
46434643
}
46444644
if (!StringUtils.isAllEmpty(ipv6Range, vlan.getIp6Range())) {
46454645
String r1 = StringUtils.isEmpty(ipv6Range) ? NetUtils.getIpv6RangeFromCidr(vlanIp6Cidr) : ipv6Range;
4646-
String r2 = StringUtils.isEmpty(vlan.getIp6Range()) ? NetUtils.getIpv6RangeFromCidr(vlanIp6Cidr) : vlan.getIp6Range();
4646+
String r2 = StringUtils.isEmpty(vlan.getIp6Range()) ? NetUtils.getIpv6RangeFromCidr(vlan.getIp6Cidr()) : vlan.getIp6Range();
46474647
if(NetUtils.isIp6RangeOverlap(r1, r2)) {
46484648
throw new InvalidParameterValueException(String.format("The IPv6 range with tag: %s already has IPs that overlap with the new range.",
46494649
vlan.getVlanTag()));

0 commit comments

Comments
 (0)