diff options
author | Laine Stump <laine@laine.org> | 2014-05-01 11:40:41 +0300 |
---|---|---|
committer | Laine Stump <laine@laine.org> | 2014-05-01 16:27:53 +0300 |
commit | 062673a97f4f65610e5ac4ab7c14939c436749e5 (patch) | |
tree | 409eefbb34e64a95b66c7cf0704e8770d57fef1f | |
parent | fb285a9dc2365e051acb095261d4a56d4e1f1c72 (diff) | |
download | libvirt-062673a97f4f65610e5ac4ab7c14939c436749e5.tar.gz |
qemu: fix crash when removing <filterref> from interface with update-device
If a domain network interface that contains a <filterref> is modified
"live" using "virsh update-device --live", libvirtd would crash. This
was because the code supporting live update of an interface's
filterref was assuming that a filterref might be added or modified,
but didn't account for removing the filterref, resulting in a null
dereference of the filter name.
Introduced with commit 258fb278, which was first in libvirt v1.0.1.
This addresses https://bugzilla.redhat.com/show_bug.cgi?id=1093301
(cherry picked from commit 0eac9d1e90fc3388030c6109aeb1f4860f108054)
-rw-r--r-- | src/qemu/qemu_hotplug.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 032de6954a..58be75e313 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1607,7 +1607,8 @@ qemuDomainChangeNetFilter(virConnectPtr conn, virDomainConfNWFilterTeardown(olddev); - if (virDomainConfNWFilterInstantiate(conn, vm->def->uuid, newdev) < 0) { + if (newdev->filter && + virDomainConfNWFilterInstantiate(conn, vm->def->uuid, newdev) < 0) { virErrorPtr errobj; virReportError(VIR_ERR_OPERATION_FAILED, |