You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2012/08/02 04:08:32 UTC

[8/44] git commit: VPC: CS-15791 - allow having the same NetworkACL for 2 different protocols

VPC: CS-15791 - allow having the same NetworkACL for 2 different protocols


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

Branch: refs/heads/vpc
Commit: d2df3e01024f5afb8cb2a57e93a6a5cf6c8a9460
Parents: 4810287
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Wed Aug 1 15:25:00 2012 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Wed Aug 1 18:48:21 2012 -0700

----------------------------------------------------------------------
 .../cloud/network/vpc/NetworkACLManagerImpl.java   |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/d2df3e01/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java b/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
index f886f1d..a2a70b6 100644
--- a/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
@@ -219,8 +219,8 @@ public class NetworkACLManagerImpl implements Manager,NetworkACLManager{
                 "network conflicts so we should at least have one rule at this point.";
 
         for (FirewallRuleVO rule : rules) {
-            if (rule.getId() == newRule.getId()) {
-                continue; // Skips my own rule.
+            if (rule.getId() == newRule.getId() || !rule.getProtocol().equalsIgnoreCase(newRule.getProtocol())) {
+                continue; // Skips my own rule and skip the rule if the protocol is different
             }
 
             // if one cidr overlaps another, do port veirficatino