CLOUDSTACK-4286. Add one more check for validating vlanrange parameter with "dedicateGuestVlanRange" API

This commit is contained in:
Likitha Shetty 2013-08-13 18:25:59 +05:30
parent 29a399b9ae
commit 4d48d9603d

View File

@ -2955,7 +2955,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
for (int i=0 ; i < existingRanges.size(); i++){
int existingStartVlan = existingRanges.get(i).first();
int existingEndVlan = existingRanges.get(i).second();
if (startVlan >= existingStartVlan && endVlan <= existingEndVlan) {
if (startVlan <= endVlan && startVlan >= existingStartVlan && endVlan <= existingEndVlan) {
exists = true;
break;
}