mirror of
https://github.com/apache/cloudstack
synced 2026-08-10 00:16:08 +00:00
bug 8455: for static nat port range don't allow start port to be bigger than end port
status 8455: resolved fixed
This commit is contained in:
parent
0938509bc0
commit
8cd7426dd0
@ -243,6 +243,11 @@ public class RulesManagerImpl implements RulesManager, RulesService, Manager {
|
||||
throw new InvalidParameterValueException("Protocol " + rule.getProtocol() + " is not supported in zone " + network.getDataCenterId());
|
||||
}
|
||||
|
||||
//start port can't be bigger than end port
|
||||
if (rule.getDestinationPortStart() > rule.getDestinationPortEnd()) {
|
||||
throw new InvalidParameterValueException("Start port can't be bigger than end port");
|
||||
}
|
||||
|
||||
PortForwardingRuleVO newRule =
|
||||
new PortForwardingRuleVO(rule.getXid(),
|
||||
rule.getSourceIpAddressId(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user