Bug 12606: firewall rule validation for icmp source cidr for duplicate entry.

This commit is contained in:
Naredula Janardhana Reddy 2012-01-12 15:36:42 +05:30
parent 26011e6d26
commit eb1b709193
1 changed files with 1 additions and 1 deletions

View File

@ -283,7 +283,7 @@ public class FirewallManagerImpl implements FirewallService, FirewallManager, Ma
}
if (newRule.getProtocol().equalsIgnoreCase(NetUtils.ICMP_PROTO) && newRule.getProtocol().equalsIgnoreCase(rule.getProtocol())) {
if (newRule.getIcmpCode().longValue() == rule.getIcmpCode().longValue() && newRule.getIcmpType().longValue() == rule.getIcmpType().longValue() && newRule.getProtocol().equalsIgnoreCase(rule.getProtocol())) {
if (newRule.getIcmpCode().longValue() == rule.getIcmpCode().longValue() && newRule.getIcmpType().longValue() == rule.getIcmpType().longValue() && newRule.getProtocol().equalsIgnoreCase(rule.getProtocol()) && duplicatedCidrs) {
throw new InvalidParameterValueException("New rule conflicts with existing rule id=" + rule.getId());
}
}