mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-1771: Fix VR IP change when restartnetwork with cleanup=true in basic zone
In basic network, the correct network id associate with IP is source network id rather than network id.
This commit is contained in:
parent
4f43839dae
commit
307a35a618
|
|
@ -2165,7 +2165,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
|
|||
List<? extends Vlan> vlans = _vlanDao.listVlansForPod(podId);
|
||||
for (Vlan vlan : vlans) {
|
||||
if (nic.getIp4Address() != null) {
|
||||
IpAddress ip = _ipAddressDao.findByIpAndNetworkId(network.getId(), nic.getIp4Address());
|
||||
IpAddress ip = _ipAddressDao.findByIpAndSourceNetworkId(network.getId(), nic.getIp4Address());
|
||||
if (ip != null && ip.getVlanId() == vlan.getId()) {
|
||||
return nic;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue