mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
conf: reattach interface taps to correct bridge on restart
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 <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
d6aaa639e4
commit
b22749334d
@ -30942,13 +30942,16 @@ virDomainNetNotifyActualDevice(virConnectPtr conn,
|
|||||||
virDomainDefPtr dom,
|
virDomainDefPtr dom,
|
||||||
virDomainNetDefPtr iface)
|
virDomainNetDefPtr iface)
|
||||||
{
|
{
|
||||||
|
virDomainNetType actualType = virDomainNetGetActualType(iface);
|
||||||
|
|
||||||
if (!virUUIDIsValid(iface->data.network.portid)) {
|
if (!virUUIDIsValid(iface->data.network.portid)) {
|
||||||
if (virDomainNetCreatePort(conn, dom, iface,
|
if (virDomainNetCreatePort(conn, dom, iface,
|
||||||
VIR_NETWORK_PORT_CREATE_RECLAIM) < 0)
|
VIR_NETWORK_PORT_CREATE_RECLAIM) < 0)
|
||||||
return;
|
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,
|
* NB: we can't notify the guest of any MTU change anyway,
|
||||||
* so there is no point in trying to learn the actualMTU
|
* so there is no point in trying to learn the actualMTU
|
||||||
|
Loading…
Reference in New Issue
Block a user