diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config index f93c39d81e8..5835c4dde1b 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -544,7 +544,14 @@ setup_dnsmasq() { [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. - echo "$ETH0_IP data-server" >> /etc/hosts + if [ -n "$ETH0_IP" ] + then + echo "$ETH0_IP data-server" >> /etc/hosts + fi + if [ -n "$ETH0_IP6" ] + then + echo "$ETH0_IP6 data-server" >> /etc/hosts + fi } setup_sshd(){ diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index fd170bd850f..bdb526089b2 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -2831,6 +2831,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati ip6Gateway = network.getIp6Gateway(); ip6Cidr = network.getIp6Cidr(); _networkModel.checkIp6Parameters(startIPv6, endIPv6, ip6Gateway, ip6Cidr); + sameSubnet = true; } } } @@ -2846,7 +2847,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati vlanDetails = new Pair(newVlanGateway, newVlanNetmask); } // check if the gatewayip is the part of the ip range being added. - if (NetUtils.ipRangesOverlap(startIP, endIP, vlanDetails.first(), vlanDetails.first())) { + if (ipv4 && NetUtils.ipRangesOverlap(startIP, endIP, vlanDetails.first(), vlanDetails.first())) { throw new InvalidParameterValueException( "The gateway ip should not be the part of the ip range being added."); } diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java index f6e9a0ae56f..0e8011962b0 100755 --- a/server/src/com/cloud/network/NetworkManagerImpl.java +++ b/server/src/com/cloud/network/NetworkManagerImpl.java @@ -2004,8 +2004,10 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L _networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.Dhcp, element.getProvider()) && element instanceof DhcpServiceProvider) { DhcpServiceProvider sp = (DhcpServiceProvider) element; - if (!sp.configDhcpSupportForSubnet(network, profile, vmProfile, dest, context)) { - return false; + if (profile.getIp6Address() == null) { + if (!sp.configDhcpSupportForSubnet(network, profile, vmProfile, dest, context)) { + return false; + } } sp.addDhcpEntry(network, profile, vmProfile, dest, context); }