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.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
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)) {
--
2.46.0