cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/master to adf7de9
Date Thu, 14 Aug 2014 09:00:42 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 7c92bac4a -> adf7de9a9


CLOUDSTACK-5663 : Added the NULL CIDR check to avoid NPE for createNetwork and listNetwork

Signed-off-by: Daan Hoogland <daan@onecht.net>


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

Branch: refs/heads/master
Commit: adf7de9a95fb5a9d08d4c091e85469605ae2074a
Parents: 7c92bac
Author: Girish Chaudhari <girish.chaudhari@sungard.com>
Authored: Thu Jul 10 19:04:28 2014 +0530
Committer: Daan Hoogland <daan@onecht.net>
Committed: Thu Aug 14 10:34:45 2014 +0200

----------------------------------------------------------------------
 server/src/com/cloud/network/NetworkModelImpl.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/adf7de9a/server/src/com/cloud/network/NetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java
index 0ef5cb9..a838efb 100755
--- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -590,6 +590,10 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel
{
                 hasFreeIps = isIP6AddressAvailableInNetwork(network.getId());
             }
         } else {
+            if (network.getCidr() == null) {
+                s_logger.debug("Network - " + network.getId() +  " has NULL CIDR.");
+                return false;
+            }
             hasFreeIps = (getAvailableIps(network, null)).size() > 0;
         }
 


Mime
View raw message