bug 10561: allowing to create a firewall rule with sameport range but different protocols

This commit is contained in:
Naredula Janardhana Reddy 2011-08-12 12:53:50 +05:30 committed by alena
parent 51f4485143
commit c63f9fbca2

View File

@ -232,7 +232,8 @@ public class FirewallManagerImpl implements FirewallService, FirewallManager, Ma
}
boolean allowFirewall = ((rule.getPurpose() == Purpose.Firewall || newRule.getPurpose() == Purpose.Firewall) && newRule.getPurpose() != rule.getPurpose());
boolean allowFirewall = ((rule.getPurpose() == Purpose.Firewall || newRule.getPurpose() == Purpose.Firewall) && ((newRule.getPurpose() != rule.getPurpose()) || (!newRule.getProtocol().equalsIgnoreCase(rule.getProtocol()))));
if (!allowFirewall) {
if (rule.getPurpose() == Purpose.StaticNat && newRule.getPurpose() != Purpose.StaticNat) {