Repository: cloudstack
Updated Branches:
  refs/heads/master 3b442acdd -> 55e11cddc


CLOUDSTACK-7728: Fixed adding icmp rules with different types and codes


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7cd34385
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7cd34385
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7cd34385

Branch: refs/heads/master
Commit: 7cd34385801514b8c0ce51bc0d2ea036713c285c
Parents: 6967c6c
Author: Jayapal <[email protected]>
Authored: Wed Oct 15 17:08:59 2014 +0530
Committer: Jayapal <[email protected]>
Committed: Thu Oct 16 09:37:42 2014 +0530

----------------------------------------------------------------------
 server/src/com/cloud/network/firewall/FirewallManagerImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7cd34385/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/firewall/FirewallManagerImpl.java 
b/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
index ddc2f73..0537a27 100644
--- a/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
+++ b/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
@@ -406,7 +406,7 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
                 (newRule.getSourcePortStart() != null && 
newRule.getSourcePortEnd() != null && rule.getSourcePortStart() != null && 
rule.getSourcePortEnd() != null);
             boolean nullPorts =
                 (newRule.getSourcePortStart() == null && 
newRule.getSourcePortEnd() == null && rule.getSourcePortStart() == null && 
rule.getSourcePortEnd() == null);
-            if(nullPorts && duplicatedCidrs && 
(rule.getProtocol().equalsIgnoreCase(newRule.getProtocol())))
+            if(nullPorts && duplicatedCidrs && 
(rule.getProtocol().equalsIgnoreCase(newRule.getProtocol())) && 
!newRule.getProtocol().equalsIgnoreCase(NetUtils.ICMP_PROTO))
             {
                 throw new NetworkRuleConflictException("There is already a 
firewall rule specified with protocol = " +newRule.getProtocol()+ " and no 
ports");
             }

Reply via email to