You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sh...@apache.org on 2022/09/06 11:13:27 UTC
[cloudstack] branch 4.17 updated: server: fix check for ipv6 range overlap (#6705)
This is an automated email from the ASF dual-hosted git repository.
shwstppr pushed a commit to branch 4.17
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.17 by this push:
new f18eebf2e9 server: fix check for ipv6 range overlap (#6705)
f18eebf2e9 is described below
commit f18eebf2e958ffd63be8b47996ad07b8c04a9c34
Author: Abhishek Kumar <ab...@gmail.com>
AuthorDate: Tue Sep 6 16:43:20 2022 +0530
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.
---
.../src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
index 1dd73aa593..9dc1a5201b 100755
--- a/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -4643,7 +4643,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
}
if (!StringUtils.isAllEmpty(ipv6Range, vlan.getIp6Range())) {
String r1 = StringUtils.isEmpty(ipv6Range) ? NetUtils.getIpv6RangeFromCidr(vlanIp6Cidr) : ipv6Range;
- String r2 = StringUtils.isEmpty(vlan.getIp6Range()) ? NetUtils.getIpv6RangeFromCidr(vlanIp6Cidr) : vlan.getIp6Range();
+ String r2 = StringUtils.isEmpty(vlan.getIp6Range()) ? NetUtils.getIpv6RangeFromCidr(vlan.getIp6Cidr()) : vlan.getIp6Range();
if(NetUtils.isIp6RangeOverlap(r1, r2)) {
throw new InvalidParameterValueException(String.format("The IPv6 range with tag: %s already has IPs that overlap with the new range.",
vlan.getVlanTag()));