Re: [PATCH 6/8] network: Try to read dnsmasq PIDs for inactive networks too

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

 



On 9/3/24 10:36 AM, Martin Kletzander wrote:
Just in case one needs a clean up.

Resolves: https://issues.redhat.com/browse/RHEL-50968
Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>

Reviewed-by: Laine Stump <laine@xxxxxxxxxx>

---
  src/network/bridge_driver.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index ebdb39d0743b..3ef3444da241 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -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;



[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