1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

remove port filter when network device is detached

* src/qemu/qemu_driver.c: remove the port filter if the network device
  is detached via virDomainDetachDevice.
This commit is contained in:
Gerhard Stenzel 2009-11-24 11:25:16 +01:00 committed by Daniel Veillard
parent e7c78b0a94
commit fb7cebb767

View File

@ -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,