]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: store network macTableManager setting in NetDef actual object
authorLaine Stump <laine@laine.org>
Fri, 21 Nov 2014 17:35:15 +0000 (12:35 -0500)
committerLaine Stump <laine@laine.org>
Mon, 8 Dec 2014 19:45:09 +0000 (14:45 -0500)
commit33f4a8bc038bf05ece1ed42e9bf77fba780d0cb1
treed74c73d3e02920120768122b13008a6f1ea77940
parenta3609121799d44898a3e0d0bf92b755e55e7b418
network: store network macTableManager setting in NetDef actual object

At the time that the network driver allocates a connection to a
network, the tap device that will be used hasn't yet been created -
that will be done later by qemu (or lxc or whoever) - but if the
network has macTableManager='libvirt', then when we do get around to
creating the tap device, we will need to add an entry for it to the
network bridge's fdb (forwarding database) *and* turn off learning and
unicast_flood for that tap device in the bridge's sysfs settings. This
means that qemu needs to know both the bridge name as well as the
setting of macTableManager, so we either need to create a new API to
retrieve that info, or just pass it back in the ActualNetDef that is
created during networkAllocateActualDevice. We choose the latter
method, since it's already done for the bridge device, and it has the
side effect of making the information available in domain status.

(NB: in the future, I think that the tap device should actually be
created by networkAllocateActualDevice(), as that will solve several
other problems, but that is a battle for another day, and this
information will still be useful outside the network driver)
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms
src/network/bridge_driver.c