mirror of https://github.com/apache/cloudstack.git
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>
This commit is contained in:
parent
42f628c61c
commit
080bc2e2e9
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue