Re: [PATCH 1/8] network: Do not update network ports for inactive networks

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

 



On 9/3/24 10:36 AM, Martin Kletzander wrote:
The semantic does not change since inside networkUpdatePort() (well,
networkNotifyPort, for which the former is a wrapper) exits for inactive
networks, but with an error we can easily avoid with this patch.


(which normally wouldn't happen, *except* when a network's bridge device has disappeared causing us to mark the network inactive *during* networkUpdate state. Yep.)

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>

Reviewed-by: Laine Stump <laine@xxxxxxxxxx>

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

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 915211d1b590..5b510a222cd2 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -489,7 +489,8 @@ networkUpdateState(virNetworkObj *obj,
          return -1;
      }
- virNetworkObjPortForEach(obj, networkUpdatePort, obj);
+    if (virNetworkObjIsActive(obj))
+        virNetworkObjPortForEach(obj, networkUpdatePort, obj);
/* Try and read dnsmasq pids of active networks */
      if (virNetworkObjIsActive(obj) && def->ips && (def->nips > 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