mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Check for null vnet when allocation fails
This commit is contained in:
parent
b3cf83c94e
commit
ef41ebc9ec
2
server/src/com/cloud/network/NetworkManagerImpl.java
Executable file → Normal file
2
server/src/com/cloud/network/NetworkManagerImpl.java
Executable file → Normal file
@ -880,7 +880,9 @@ public class NetworkManagerImpl implements NetworkManager, VirtualMachineManager
|
|||||||
vnet = _dcDao.allocateVnet(router.getDataCenterId(), router.getAccountId());
|
vnet = _dcDao.allocateVnet(router.getDataCenterId(), router.getAccountId());
|
||||||
}
|
}
|
||||||
vnetAllocated = true;
|
vnetAllocated = true;
|
||||||
|
if(vnet != null){
|
||||||
routerMacAddress = getRouterMacForVnet(dc, vnet);
|
routerMacAddress = getRouterMacForVnet(dc, vnet);
|
||||||
|
}
|
||||||
} else if (router.getRole() == Role.DHCP_USERDATA) {
|
} else if (router.getRole() == Role.DHCP_USERDATA) {
|
||||||
if (!Vlan.UNTAGGED.equals(router.getVlanId())) {
|
if (!Vlan.UNTAGGED.equals(router.getVlanId())) {
|
||||||
vnet = router.getVlanId().trim();
|
vnet = router.getVlanId().trim();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user