[PATCH 5/8] network: Clean up after inactive objects during start

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux