]> xenbits.xensource.com Git - libvirt.git/commitdiff
network: Try to read dnsmasq PIDs for inactive networks too
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 3 Sep 2024 07:07:54 +0000 (09:07 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 17 Sep 2024 07:40:37 +0000 (09:40 +0200)
Just in case one needs a clean up.

Resolves: https://issues.redhat.com/browse/RHEL-50968
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/network/bridge_driver.c

index ebdb39d0743bf4d519545eccfd784c864890cf71..3ef3444da24193a16c7a4c8d33b2e7e632c7b131 100644 (file)
@@ -492,8 +492,9 @@ networkUpdateState(virNetworkObj *obj,
     if (virNetworkObjIsActive(obj))
         virNetworkObjPortForEach(obj, networkUpdatePort, obj);
 
-    /* Try and read dnsmasq pids of active networks */
-    if (virNetworkObjIsActive(obj) && def->ips && (def->nips > 0)) {
+    /* Try and read dnsmasq pids of both active and inactive networks, just in
+     * case a network became inactive and we need to clean up. */
+    if (def->ips && (def->nips > 0)) {
         const char *binpath = NULL;
         pid_t dnsmasqPid;