From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiNfd-0004WG-0n for qemu-devel@nongnu.org; Fri, 31 May 2013 07:39:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiNfb-00062r-Kp for qemu-devel@nongnu.org; Fri, 31 May 2013 07:38:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiNfb-00061x-D8 for qemu-devel@nongnu.org; Fri, 31 May 2013 07:38:55 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4VBcsrL022405 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 31 May 2013 07:38:54 -0400 Message-ID: <51A88BCB.1060800@redhat.com> Date: Fri, 31 May 2013 13:38:51 +0200 From: =?ISO-8859-1?Q?J=E1n_Tomko?= MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] NBD drives with literal IPv6 addresses or hostnames starting with a digit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, libvir-list@redhat.com Hello, since qemu's commit v1.4.0-736-gf17c90b [1]: nbd: Keep hostname and port separate * literal IPv6 addresses no longer work in nbd URIs, because getaddrinfo is called with the surrounding brackets: $ qemu-system-x86_64 -drive file=nbd://[::1]:1234/quack qemu-system-x86_64: -drive file=nbd://[::1]:1234/quack: address resolution failed for [::1]:1234: Name or service not known * hostnames starting with a digit now work in nbd URIs. Before that, or with the non-URI syntax, they fail because inet_parse assumes them to be literal IPv4 addresses: $ qemu-system-x86_64 -drive file=nbd:123flour:1234:exportname=gashunk qemu-system-x86_64: -drive file=nbd:123flour:1234:exportname=gashunk: error parsing IPv4 address '123flour:1234' In libvirt, we use the URI format on the command line only if the host contains ':', so hostnames starting with a digit still don't work. Migration with NBD and a literal IPv6 address doesn't work either, but that's purely libvirt's fault, as we don't escape it with brackets. I've just posted a patch for that. [2] Jan [1] http://git.qemu.org/?p=qemu.git;a=commitdiff;h=f17c90b [2] https://www.redhat.com/archives/libvir-list/2013-May/msg02022.html