Now that this function can be called regardless of interface type (and
whether or not we have a conn for the network driver), let's actually
call it for all interface types. This will assure that we re-connect
any disconnected bridge devices for <interface type='bridge'> as
mentioned in
https://bugzilla.redhat.com/show_bug.cgi?id=1730084#c26
(until now we've only been reconnecting bridge devices for <interface
type='network'>)
Signed-off-by: Laine Stump <laine(a)redhat.com>
---
src/libxl/libxl_driver.c | 9 ++++-----
src/lxc/lxc_process.c | 9 ++++-----
src/qemu/qemu_process.c | 9 ++++-----
3 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index d58af1a869..40d8c3d174 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -367,11 +367,10 @@ libxlReconnectNotifyNets(virDomainDefPtr def)
if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_DIRECT)
virNetDevReserveName(net->ifname);
- if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
- if (!conn && !(conn = virGetConnectNetwork()))
- continue;
- virDomainNetNotifyActualDevice(conn, def, net);
- }
+ if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK && !conn)
+ conn = virGetConnectNetwork();
+
+ virDomainNetNotifyActualDevice(conn, def, net);
}
virObjectUnref(conn);
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 2266e2cc40..0b6895bbd4 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -1663,11 +1663,10 @@ virLXCProcessReconnectNotifyNets(virDomainDefPtr def)
break;
}
- if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
- if (!conn && !(conn = virGetConnectNetwork()))
- continue;
- virDomainNetNotifyActualDevice(conn, def, net);
- }
+ if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK && !conn)
+ conn = virGetConnectNetwork();
+
+ virDomainNetNotifyActualDevice(conn, def, net);
}
virObjectUnref(conn);
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index f0a698ba3d..202d867289 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3411,11 +3411,10 @@ qemuProcessNotifyNets(virDomainDefPtr def)
break;
}
- if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
- if (!conn && !(conn = virGetConnectNetwork()))
- continue;
- virDomainNetNotifyActualDevice(conn, def, net);
- }
+ if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK && !conn)
+ conn = virGetConnectNetwork();
+
+ virDomainNetNotifyActualDevice(conn, def, net);
}
}
--
2.29.2