Since
f03dcc5 we use [::] as the listening address both on qemu
command line in -incoming and in nbd-server-start QMP command.
However the latter requires just :: without the braces.
unsigned short port = 0;
char *diskAlias = NULL;
size_t i;
+ const char *host;
+
+ if (STREQ(listenAddr, "[::]"))
+ host = "::";
+ else
+ host = listenAddr;
for (i = 0; i < vm->def->ndisks; i++) {
virDomainDiskDefPtr disk = vm->def->disks[i];
if (!port &&
((virPortAllocatorAcquire(driver->remotePorts, &port) < 0) ||
- (qemuMonitorNBDServerStart(priv->mon, listenAddr, port) < 0))) {
+ (qemuMonitorNBDServerStart(priv->mon, host, port) < 0))) {
qemuDomainObjExitMonitor(driver, vm);
goto cleanup;
}