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:
alena 2011-02-11 17:34:43 -08:00
parent 0938509bc0
commit 8cd7426dd0
1 changed files with 5 additions and 0 deletions

View File

@ -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(),