mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
network: differentiate macvtap/bridge from host-bridge based networks
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1316465 An attempt to simplify the code for the VIR_NETWORK_FORWARD_BRIDGE case of networkUpdateState in commit b61db335 (first in release 1.2.14) resulted in networks based on macvtap bridge mode being erroneously marked as inactive any time libvirtd was restarted. The problem is that the original code had differentiated between a network using tap devices to connect to an existing host-bridge device (forward mode of VIR_NETWORK_FORWARD_BRIDGE and a non-NULL def->bridge), and one using macvtap bridge mode to connect to any ethernet device (still forward mode VIR_NETWORK_FORWARD_BRIDGE, but null def->bridge), but the changed code assumed that all networks with VIR_NETWORK_FORWARD_BRIDGE were tap + host-bridge networks, so a null def->bridge was interpreted as "inactive". This patch restores the original code in networkUpdateState
This commit is contained in:
parent
5e6d2af72f
commit
2a537fe187
@ -405,7 +405,8 @@ networkUpdateState(virNetworkObjPtr obj,
|
||||
break;
|
||||
|
||||
case VIR_NETWORK_FORWARD_BRIDGE:
|
||||
if (!(obj->def->bridge && virNetDevExists(obj->def->bridge) == 1)) {
|
||||
if (obj->def->bridge) {
|
||||
if (virNetDevExists(obj->def->bridge) != 1)
|
||||
obj->active = 0;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user