These patches set up an event handler for qemu's NIC_RX_FILTER_CHANGED event, which is sent whenever a guest makes a change to a network device's unicast/multicast filter, vlan table, or MAC address (as long as there has been no previous event of the same type sent for the same interface without a corresponding query-rx-filter sent back from qemu). The handler checks if it is appropriate to respond to the NIC_RX_FILTER_CHANGED event (based on device type and configuration) and takes appropriate action. Currently it checks if the guest interface has been configured with trustGuestRxFilters='yes' (defaults to 'no' for security reasons), and if the host side device is macvtap. If so, and the MAC address on the guest has changed, the MAC address of the macvtap device is changed to match. The result of this is that networking from the guest will continue to work if the mac address of a macvtap-connected network device is changed from within the guest, as long as trustGuestRxFilters='yes' (previously changing the MAC address in the guest would break networking). Changes from V1: Responded to review comments from John Ferlan, Amos Kong, and Tom Krowiak, updated to indicate support was added in 1.2.10 rather than 1.2.9, and added an extra patch which puts a new .txt file in the qemu directory describing the mechanics of a qemu event handler (lifted from the commit log message of 5/7) Laine Stump (7): conf: add trustGuestRxFilters attribute to network and domain interface network: set interface actual trustGuestRxFilters from network/portgroup util: define virNetDevRxFilter and basic utility functions qemu: qemuMonitorQueryRxFilter - retrieve guest netdev rx-filter qemu: setup infrastructure to handle NIC_RX_FILTER_CHANGED event qemu: change macvtap device MAC address in response to NIC_RX_FILTER_CHANGED qemu: add short document on qemu event handlers docs/formatdomain.html.in | 40 +++- docs/formatnetwork.html.in | 29 ++- docs/schemas/domaincommon.rng | 5 + docs/schemas/network.rng | 10 + src/conf/domain_conf.c | 42 ++++ src/conf/domain_conf.h | 3 + src/conf/network_conf.c | 36 ++++ src/conf/network_conf.h | 2 + src/libvirt_private.syms | 5 + src/network/bridge_driver.c | 10 + src/qemu/EVENTHANDLERS.txt | 77 +++++++ src/qemu/qemu_domain.h | 1 + src/qemu/qemu_driver.c | 105 ++++++++++ src/qemu/qemu_monitor.c | 39 ++++ src/qemu/qemu_monitor.h | 11 + src/qemu/qemu_monitor_json.c | 232 +++++++++++++++++++++ src/qemu/qemu_monitor_json.h | 3 + src/qemu/qemu_process.c | 42 ++++ src/util/virnetdev.c | 31 +++ src/util/virnetdev.h | 42 +++- tests/Makefile.am | 1 + tests/networkxml2xmlin/vepa-net.xml | 4 +- tests/networkxml2xmlout/vepa-net.xml | 4 +- .../qemuxml2argv-net-virtio-network-portgroup.xml | 4 +- 24 files changed, 761 insertions(+), 17 deletions(-) create mode 100644 src/qemu/EVENTHANDLERS.txt -- 1.9.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list