[libvirt] [PATCH] Don't use AI_ADDRCONFIG when binding to wildcard addresses
Eric Blake
eblake at redhat.com
Thu May 29 14:47:25 UTC 2014
On 05/29/2014 03:32 AM, Ján Tomko wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1098659
>
> With parallel boot, network addresses might not yet be assigned [1],
> but binding to wildcard addresses should work.
>
> For non-wildcard addresses, ADDRCONFIG is still used. Document this
> in libvirtd.conf.
>
> [1] http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
> ---
> - hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
> + hints.ai_flags = AI_PASSIVE;
> hints.ai_socktype = SOCK_STREAM;
>
> + /* Don't use ADDRCONFIG for binding to the wildcard address.
> + * Just catch the error returned by socket() if the system has
> + * no IPv6 support.
> + *
> + * This allows libvirtd to be started in parallel with the network
> + * startup in most cases.
> + */
> + if (nodename &&
> + !(virSocketAddrParse(&tmp_addr, nodename, AF_UNSPEC) > 0 &&
> + virSocketAddrIsWildcard(&tmp_addr)))
> + hints.ai_flags = AI_ADDRCONFIG;
Shouldn't this be |= ?
Otherwise, it makes sense to me.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140529/81cfe954/attachment-0001.sig>
More information about the libvir-list
mailing list