You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mu...@apache.org on 2013/07/30 12:19:24 UTC

git commit: updated refs/heads/master to c520aae

Updated Branches:
  refs/heads/master 28835054e -> c520aae34


CLOUDSTACK-2991: [PortableIPRange] CS should not allow portable IP with
sourceNAT service on it

if a portable ip is first IP associated with a non-VPC network, then its
being considered as source nat IP. This fix adds exemption for portable
IP not to be considred for source nat.


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

Branch: refs/heads/master
Commit: c520aae34664ffe4a4456af5cc2e80b357fa732e
Parents: 2883505
Author: Murali Reddy <mu...@gmail.com>
Authored: Tue Jul 30 15:34:04 2013 +0530
Committer: Murali Reddy <mu...@gmail.com>
Committed: Tue Jul 30 15:49:09 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/network/NetworkManagerImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c520aae3/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index 49162e0..2c7dfa1 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -955,7 +955,8 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
         boolean isSourceNat = false;
         if (!sharedSourceNat) {
             if (getExistingSourceNatInNetwork(owner.getId(), networkId) == null) {
-                if (network.getGuestType() == GuestType.Isolated && network.getVpcId() == null) {
+                if (network.getGuestType() == GuestType.Isolated && network.getVpcId() == null &&
+                        !ipToAssoc.isPortable()) {
                     isSourceNat = true;
                 }
             }