]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: differentiate macvtap/bridge from host-bridge based networks
authorLaine Stump <laine@laine.org>
Fri, 11 Mar 2016 15:59:19 +0000 (10:59 -0500)
committerLaine Stump <laine@laine.org>
Fri, 25 Mar 2016 17:21:29 +0000 (13:21 -0400)
commit2a537fe187fbca9d95816ffdd9db0327f70ae1be
tree5827bcf1ba40fbe999d93a6a8de2e34e84053fd5
parent5e6d2af72fc83122dc960f402623ab803c2c2508
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
src/network/bridge_driver.c