From 58f2f37fc96df84fa202baeba5a0fc7e9f3f0cdf Mon Sep 17 00:00:00 2001 From: abhishek Date: Tue, 4 Jan 2011 15:22:34 -0800 Subject: [PATCH] adding more range checks in the createZone functionality --- .../src/com/cloud/configuration/ConfigurationManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index a0cdcd2f0e9..39c8c70e016 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -1145,7 +1145,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura throw new InvalidParameterValueException("Please specify valid integers for the vlan range."); } - if(vnetStart > vnetEnd) { + if((vnetStart > vnetEnd) || (vnetStart < 0) || (vnetEnd > 4096)) { s_logger.warn("Invalid vnet range: start range:"+vnetStart+" end range:"+vnetEnd); throw new InvalidParameterValueException("Vnet range should be between 0-4096 and start range should be lesser than or equal to end range"); }