qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] nbd: strip braces from literal IPv6 address


From: Ján Tomko
Subject: Re: [Qemu-devel] [PATCH 2/2] nbd: strip braces from literal IPv6 address in URI
Date: Thu, 13 Jun 2013 16:55:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130521 Thunderbird/17.0.6

On 06/04/2013 11:27 PM, Paolo Bonzini wrote:
> Il 03/06/2013 17:54, Ján Tomko ha scritto:
>> Otherwise they would get passed to getaddrinfo and fail with:
>> address resolution failed for [::1]:1234: Name or service not known
> 
> Hmm... Hai Huang found a similar problem:
> 
> error: internal error unable to execute QEMU command 'nbd-server-start':
> address resolution failed for [::]:5900: Name or service not known
> 

That one should be fixed in libvirt-1.0.5.2 and libvirt-1.0.6 now. [1]

> This one is a libvirt bug, but perhaps it's simpler to just have a
> wrapper for getaddrinfo that strips brackets (and not strip the brackets
> in inet_parse, too).

I'm not sure if there are places other than calling getaddrinfo where having
brackets would be bad, I'm not that familiar with QEMU code.

I've thought about stripping the brackets in uri_parse too, as we do in
libvirt when parsing URIs. This wouldn't fix the case of someone specifying a
bracket-ecaped hostname where there is no need for escaping it, like the
libvirt bug.

And my patch is incomplete, because there are other block drivers calling
uri_parse without stripping the brackets.

Jan

[1] http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=3accd7eb



reply via email to

[Prev in Thread] Current Thread [Next in Thread]