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

This commit is contained in:
Naredula Janardhana Reddy 2012-01-12 15:29:38 +05:30
parent fbc8c27f68
commit eccd6b56b8
1 changed files with 1 additions and 1 deletions

View File

@ -295,7 +295,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());
}
}