mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
network: Clean up after inactive objects during start
Once networkUpdateState() identifies a dead network it should clean up after it as well. Resolves: https://issues.redhat.com/browse/RHEL-50968 Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
@@ -510,6 +510,12 @@ networkUpdateState(virNetworkObj *obj,
|
||||
virNetworkObjSetDnsmasqPid(obj, dnsmasqPid);
|
||||
}
|
||||
|
||||
/* Clean up after networks which were active but we have found out they are
|
||||
* actually down */
|
||||
if (!virNetworkObjIsActive(obj)) {
|
||||
networkShutdownNetwork(driver, obj);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user