]> git.ipfire.org Git - thirdparty/libvirt.git/commit
set and restore MAC address of a NIC when using PASSTHROUGH mode
authorDirk Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
Tue, 21 Jun 2011 15:49:40 +0000 (11:49 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Tue, 21 Jun 2011 15:49:40 +0000 (11:49 -0400)
commitcbd8227ee0578bffa9b94a62cb037552501e986f
treec3d0292938a88fbdcf2bfae5b821089142d708a4
parent7268cb9274e6e7a4813e2d4d54316496fa68ec45
set and restore MAC address of a NIC when using PASSTHROUGH mode

The following patch addresses the problem that when a PASSTHROUGH
mode DIRECT NIC connection is made the MAC address of the NIC is
not automatically set and reset to the configured VM MAC and
back again.

The attached patch fixes this problem by setting and resetting the MAC
while remembering the previous setting while the VM is running.
This also works if libvirtd is restarted while the VM is running.

the patch passes make syntax-check
src/libvirt_private.syms
src/qemu/qemu_command.c
src/qemu/qemu_hotplug.c
src/qemu/qemu_process.c
src/util/interface.c
src/util/interface.h
src/util/macvtap.c
src/util/macvtap.h