From b22749334d4de3348ba9b0ec13359c3ecf8fefd8 Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Mon, 16 Sep 2019 20:08:00 -0400 Subject: [PATCH] conf: reattach interface taps to correct bridge on restart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the bridge re-attach handling was moved out of the network driver and into the hypervisor driver (commit b806a60e) as a part of the refactor to split the network driver into a separate daemon, the check was accidentally changed to only check for type='bridge'. The check for type in this case needs to check for type='network' as well. (at the time we thought that the two types could be conflated for interface actual type, but this turned out to be too problematic to do). Signed-off-by: Laine Stump Reviewed-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 35573c0aaf..76aaa63f57 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -30942,13 +30942,16 @@ virDomainNetNotifyActualDevice(virConnectPtr conn, virDomainDefPtr dom, virDomainNetDefPtr iface) { + virDomainNetType actualType = virDomainNetGetActualType(iface); + if (!virUUIDIsValid(iface->data.network.portid)) { if (virDomainNetCreatePort(conn, dom, iface, VIR_NETWORK_PORT_CREATE_RECLAIM) < 0) return; } - if (virDomainNetGetActualType(iface) == VIR_DOMAIN_NET_TYPE_BRIDGE) { + if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK || + actualType == VIR_DOMAIN_NET_TYPE_BRIDGE) { /* * NB: we can't notify the guest of any MTU change anyway, * so there is no point in trying to learn the actualMTU