mirror of https://github.com/apache/cloudstack.git
bug 7172: this npe occurs when we try and delete rules on a router which does not exist. fixing the same.
status 7172: resolved fixed
This commit is contained in:
parent
bfed53ab3a
commit
fe1f2824a4
|
|
@ -1401,11 +1401,13 @@ public class NetworkManagerImpl implements NetworkManager, VirtualMachineManager
|
|||
}
|
||||
|
||||
final DomainRouterVO router = _routerDao.findBy(ipVO.getAccountId(), ipVO.getDataCenterId());
|
||||
Long hostId = router.getHostId();
|
||||
|
||||
if (router == null || router.getHostId() == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Long hostId = router.getHostId();
|
||||
|
||||
if (rule.isForwarding()) {
|
||||
return updatePortForwardingRule(rule, router, hostId, oldPrivateIP, oldPrivatePort);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue