From 1e17559d53d6533d5934fd48119d60ad54c03db7 Mon Sep 17 00:00:00 2001 From: abhishek Date: Tue, 28 Dec 2010 10:31:07 -0800 Subject: [PATCH] bug 7689: whilst editing pod, we were not calculating the netmask if the netmask is not passed down from the UI. Re-calculating the netmask, based on pod attribs in db status 7689: resolved fixed --- .../src/com/cloud/configuration/ConfigurationManagerImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index c340afe9ff9..ccbe065937c 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -553,6 +553,10 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura gateway = pod.getGateway(); } + if (netmask == null) { + netmask = NetUtils.getCidrNetmask(pod.getCidrSize()); + } + if (netmask != null) { cidr = NetUtils.ipAndNetMaskToCidr(gateway, netmask); }