diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2c5086b558b7b5c42e078f7ecd27aa3f2b5c3055..356e4e7c49a43e437ded8076d289ba684c242e88 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5284,6 +5284,17 @@ qemudDomainDetachNetDevice(virConnectPtr conn, } qemuDomainObjExitMonitorWithDriver(driver, vm); + if ((driver->macFilter) && (detach->ifname != NULL)) { + if ((errno = networkDisallowMacOnPort(conn, + driver, + detach->ifname, + detach->mac))) { + virReportSystemError(conn, errno, + _("failed to remove ebtables rule on '%s'"), + detach->ifname); + } + } + if (vm->def->nnets > 1) { memmove(vm->def->nets + i, vm->def->nets + i + 1,