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,7 +489,8 @@ networkUpdateState(virNetworkObj *obj,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virNetworkObjPortForEach(obj, networkUpdatePort, obj);
|
if (virNetworkObjIsActive(obj))
|
||||||
|
virNetworkObjPortForEach(obj, networkUpdatePort, obj);
|
||||||
|
|
||||||
/* Try and read dnsmasq pids of active networks */
|
/* Try and read dnsmasq pids of active networks */
|
||||||
if (virNetworkObjIsActive(obj) && def->ips && (def->nips > 0)) {
|
if (virNetworkObjIsActive(obj) && def->ips && (def->nips > 0)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user