mirror of https://github.com/apache/cloudstack.git
bug 13305: don't allow to create ip forwarding rules when elasticIP is enabled for the network offering
status 13305: resolved fixed Reviewed-by: Will Chan
This commit is contained in:
parent
88d3f1ba03
commit
7ea3c8933d
|
|
@ -272,6 +272,12 @@ public class RulesManagerImpl implements RulesManager, RulesService, Manager {
|
|||
Long domainId = ipAddress.getAllocatedInDomainId();
|
||||
|
||||
_networkMgr.checkIpForService(ipAddress, Service.StaticNat);
|
||||
|
||||
Network network = _networkMgr.getNetwork(networkId);
|
||||
NetworkOffering off = _configMgr.getNetworkOffering(network.getNetworkOfferingId());
|
||||
if (off.getElasticIp()) {
|
||||
throw new InvalidParameterValueException("Can't create ip forwarding rules for the network where elasticIP service is enabled");
|
||||
}
|
||||
|
||||
String dstIp = _networkMgr.getIpInNetwork(ipAddress.getAssociatedWithVmId(), networkId);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue