]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Redundant listen address entry in quest xml
authorErik Skultety <eskultet@redhat.com>
Fri, 15 Aug 2014 11:50:59 +0000 (13:50 +0200)
committerJán Tomko <jtomko@redhat.com>
Mon, 18 Aug 2014 12:45:37 +0000 (14:45 +0200)
When editing guest's XML (on QEMU), it was possible to add multiple
listen elements into graphics parent element. However QEMU does not
support listening on multiple addresses. Configuration is tested for
multiple 'listen address' and if positive, an error is raised.

https://bugzilla.redhat.com/show_bug.cgi?id=1119212

src/qemu/qemu_process.c

index 52d90526e0d07d485cbee59d3212111574cebe25..f3a6af5ec16ff8b861178c2579e39215427eb434 100644 (file)
@@ -3950,6 +3950,11 @@ int qemuProcessStart(virConnectPtr conn,
                     goto cleanup;
                 }
                 graphics->listens[0].fromConfig = true;
+            } else if (graphics->nListens > 1) {
+                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                               _("QEMU does not support multiple listen "
+                                 "addresses for one graphics device."));
+                goto cleanup;
             }
         }
     }