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(a)redhat.com>
---
src/network/bridge_driver.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index e507dcd4c5c9..ebdb39d0743b 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -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;
}
--
2.46.0