Received: from eggs.gnu.org ([2001:4830:134:3::10]:36459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjqDD-0007cr-UO for qemu-devel@nongnu.org; Tue, 04 Jun 2013 08:19:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjqD6-0004eh-RU for qemu-devel@nongnu.org; Tue, 04 Jun 2013 08:19:39 -0400 Received: from mail-we0-x231.google.com ([2a00:1450:400c:c03::231]:45334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjqD6-0004eP-8X for qemu-devel@nongnu.org; Tue, 04 Jun 2013 08:19:32 -0400 Received: by mail-we0-f177.google.com with SMTP id m19so127217wev.22 for ; Tue, 04 Jun 2013 05:19:31 -0700 (PDT) Date: Tue, 4 Jun 2013 14:19:28 +0200 From: Stefan Hajnoczi Message-ID: <20130604121928.GB10055@stefanha-thinkpad.redhat.com> References: <51A88BCB.1060800@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <51A88BCB.1060800@redhat.com> Subject: Re: [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: =?iso-8859-1?B?SuFu?= Tomko Cc: libvir-list@redhat.com, Kevin Wolf , qemu-devel@nongnu.org On Fri, May 31, 2013 at 01:38:51PM +0200, Ján Tomko wrote: > 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 CCing Kevin who authored v1.4.0-736-gf17c90b. Stefan