mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 7344: preventing enabling of static nat on an ip for more than one instance. Check the nat flag, and error out if set
status 7344: resolved fixed
This commit is contained in:
parent
28e338ff7e
commit
dce3f9fa3b
@ -3146,6 +3146,11 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
||||
throw new PermissionDeniedException("Cannot create a static nat rule for the ip:"+ipAddress.getAddress()+" ,this is already a source nat ip address");
|
||||
}
|
||||
|
||||
//if given ip address is already static nat, return error
|
||||
if(ipAddress.isOneToOneNat()){
|
||||
throw new PermissionDeniedException("Cannot create a static nat rule for the ip:"+ipAddress.getAddress()+" ,this is already a static nat ip address");
|
||||
}
|
||||
|
||||
newFwRule = new FirewallRuleVO();
|
||||
newFwRule.setEnabled(true);
|
||||
newFwRule.setForwarding(true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user