Skip to content

Commit f8bd05a

Browse files
author
Alena Prokharchyk
committed
Fixed regression in GuestNetworkGuru - get networkId from the network object passed to the method call instead of retrieving it from tne NicProfile when it wasn't set yet
1 parent 691be5c commit f8bd05a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎server/src/com/cloud/network/guru/GuestNetworkGuru.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,11 @@ public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfil
373373
boolean isGateway = false;
374374
if (vm.getVirtualMachine().getType() == VirtualMachine.Type.DomainRouter) {
375375
if (network.getVpcId() != null) {
376-
if (_networkMgr.isProviderSupportServiceInNetwork(nic.getNetworkId(), Service.SourceNat, Provider.VPCVirtualRouter)) {
376+
if (_networkMgr.isProviderSupportServiceInNetwork(network.getId(), Service.SourceNat, Provider.VPCVirtualRouter)) {
377377
isGateway = true;
378378
}
379379
} else {
380-
if (_networkMgr.isProviderSupportServiceInNetwork(nic.getNetworkId(), Service.SourceNat, Provider.VirtualRouter)) {
380+
if (_networkMgr.isProviderSupportServiceInNetwork(network.getId(), Service.SourceNat, Provider.VirtualRouter)) {
381381
isGateway = true;
382382
}
383383
}

0 commit comments

Comments
 (0)