]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: reconnect tap devices during networkNotifyActualDevice
authorLaine Stump <laine@laine.org>
Tue, 21 Mar 2017 15:24:08 +0000 (11:24 -0400)
committerLaine Stump <laine@laine.org>
Wed, 22 Mar 2017 16:18:27 +0000 (12:18 -0400)
commit85bcc0220fcdc33452421256ef26d6e0080278b7
treebc796ca8f115cd4cb70191c53dea36e3a4fc94f5
parenta4541349516b5aff2da6c5309eda86dcbe6f8233
network: reconnect tap devices during networkNotifyActualDevice

If a network is destroyed and restarted, or its bridge is changed, any
tap devices that had previously been connected to the bridge will no
longer be connected. As a first step in automating a reconnection of
all tap devices when this happens, this patch modifies
networkNotifyActualDevice() (which is called once for every
<interface> of every active domain whenever libvirtd is restarted) to
reconnect any tap devices that it finds disconnected.

With this patch in place, you will need to restart libvirtd to
reconnect all the taps to their proper bridges. A future patch will
add a callback that hypervisor drivers can register with the network
driver to that the network driver can trigger this behavior
automatically whenever a network is started.
src/network/bridge_driver.c