network: Do not update network ports for inactive networks
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@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
02b57caf5e
commit
97ed0574ea
@ -489,6 +489,7 @@ networkUpdateState(virNetworkObj *obj,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (virNetworkObjIsActive(obj))
|
||||||
virNetworkObjPortForEach(obj, networkUpdatePort, obj);
|
virNetworkObjPortForEach(obj, networkUpdatePort, obj);
|
||||||
|
|
||||||
/* Try and read dnsmasq pids of active networks */
|
/* Try and read dnsmasq pids of active networks */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user