]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: replace open-coded remove/attach bridge with virNetDevTapReattachBridge()
authorLaine Stump <laine@redhat.com>
Sun, 15 Sep 2024 21:56:02 +0000 (17:56 -0400)
committerLaine Stump <laine@redhat.com>
Thu, 19 Sep 2024 17:56:31 +0000 (13:56 -0400)
commit601f4160b942e4e6ead7767a864220a7ef8d3d36
treec161aab4629e92f233cf8fdf2e45b788c629a0c9
parente3f8bccea698e5e985f109800c4f1d21194000b8
qemu: replace open-coded remove/attach bridge with virNetDevTapReattachBridge()

The new function does what the old qemuDomainChangeNetbridge() did
manually, except that:

1) the new function supports changing from a bridge of one type to
   another, e.g. from a Linux host bridge to an OVS
   bridge. (previously that wasn't handled)

2) the new function doesn't emit audit log messages. This is actually
   a good thing, because the old code would just log a "detach"
   followed immediately by "attach" for the same MAC address, so it's
   essentially a NOP. (the audit logs don't have any more detailed
   info about the connection - just the VM name and MAC address, so it
   makes no sense to log the detach/attach pair as it's not providing
   any information).

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_hotplug.c