mirror of https://github.com/apache/cloudstack.git
bug 12917: security groups - icmp type/code validations.
This commit is contained in:
parent
6aa0560d37
commit
65f84f4321
|
|
@ -601,7 +601,10 @@ public class SecurityGroupManagerImpl implements SecurityGroupManager, SecurityG
|
|||
throw new InvalidParameterValueException("Invalid ICMP type/code specified, icmpType = " + icmpType + ", icmpCode = " + icmpCode);
|
||||
}
|
||||
if (icmpType == -1 && icmpCode != -1) {
|
||||
throw new InvalidParameterValueException("Invalid icmp type range");
|
||||
throw new InvalidParameterValueException("Invalid icmp code");
|
||||
}
|
||||
if (icmpType != -1 && icmpCode == -1) {
|
||||
throw new InvalidParameterValueException("Invalid icmp code: need not negative icmp code ");
|
||||
}
|
||||
if (icmpCode > 255 || icmpType > 255 || icmpCode < -1 || icmpType < -1) {
|
||||
throw new InvalidParameterValueException("Invalid icmp type/code ");
|
||||
|
|
|
|||
Loading…
Reference in New Issue