GabrielBrascher commented on a change in pull request #4177:
URL: https://github.com/apache/cloudstack/pull/4177#discussion_r446150677
##########
File path: server/src/test/java/com/cloud/network/NetworkModelTest.java
##########
@@ -90,6 +91,11 @@
private static final long PHYSICAL_NETWORK_1_ID = 1L;
private static final long PHYSICAL_NETWORK_2_ID = 2L;
+ private static final String IPV6_CIDR = "fd59:16ba:559b:243d::/64";
Review comment:
Nowadays IPv6 networking support only `/64` CIDR. Added Unit tests
covering this.
##########
File path: server/src/main/java/com/cloud/network/NetworkServiceImpl.java
##########
@@ -1195,7 +1195,7 @@ public Network createGuestNetwork(CreateNetworkCmd cmd)
throws InsufficientCapac
if (startIP != null) {
ipv4 = true;
}
- if (startIPv6 != null) {
+ if (isNotBlank(ip6Cidr) && isNotBlank(ip6Gateway)) {
Review comment:
Due to SLAAC implementation, an IPv6 network needs CIDR and Gateway.
With the refactored code a network is "marked" as ipv6 if IPv6 CIDR and Gateway
are not null.
##########
File path:
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
##########
@@ -3781,7 +3781,7 @@ public Vlan createVlanAndPublicIpRange(final long zoneId,
final long networkId,
ipv4 = true;
}
- if (startIPv6 != null) {
+ if (vlanIp6Cidr != null) {
Review comment:
CloudStack uses SLAAC for managing IPv6 ranges, therefore it is not
necessary to have an start/end IPv6 address; on the other hand, IPv6 CIDR is
mandatory for IPv6 networks.
That is why I changed this and other pieces of code that had start/end ipv6
address as mandatory.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]