cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kis...@apache.org
Subject [23/50] [abbrv] git commit: updated refs/heads/baremetal-systemvm to 23482b1
Date Tue, 21 Oct 2014 14:57:01 GMT
CLOUDSTACK-7536 user vm can get a gateway ip when gateway ip is a part of the guest ip range.

Signed-off-by: Jayapal <jayapal@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/080bc2e2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/080bc2e2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/080bc2e2

Branch: refs/heads/baremetal-systemvm
Commit: 080bc2e2e936453078c33341453db99e62fb131f
Parents: 42f628c
Author: Bharat Kumar <bharat.kumar@citrix.com>
Authored: Wed Sep 24 15:01:13 2014 +0530
Committer: Jayapal <jayapal@apache.org>
Committed: Thu Oct 16 09:38:21 2014 +0530

----------------------------------------------------------------------
 .../src/com/cloud/configuration/ConfigurationManagerImpl.java   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/080bc2e2/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index eca9080..7dac143 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -3442,6 +3442,11 @@ public class ConfigurationManagerImpl extends ManagerBase implements
Configurati
         if (endIP != null && !NetUtils.sameSubnet(endIP, vlanGateway, vlanNetmask))
{
             throw new InvalidParameterValueException("Please ensure that your end IP is in
the same subnet as your IP range's gateway, as per the IP range's netmask.");
         }
+        // check if the gatewayip is the part of the ip range being added.
+        if (NetUtils.ipRangesOverlap(startIP, endIP, vlanGateway, vlanGateway)) {
+            throw new InvalidParameterValueException(
+                    "The gateway ip should not be the part of the ip range being added.");
+        }
     }
 
     private void checkConflictsWithPortableIpRange(long zoneId, String vlanId, String vlanGateway,
String vlanNetmask, String startIP, String endIP) {


Mime
View raw message