Re: [PATCH] virNetSocketCheckProtocols: handle EAI_NONAME as IPv6 unavailable

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

 



On Tue, Aug 11, 2015 at 01:46:44PM +0200, Guido Günther wrote:
> When running the test suite using "unshare -n" we might have IPv6 but no
> configured addresses. Due to AI_ADDRCONFIG getaddrinfo then fails with
> EAI_NONAME which we should then treat as IPv6 unavailable.
> ---
>  src/rpc/virnetsocket.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
> index 106d09a..5e5f1ab 100644
> --- a/src/rpc/virnetsocket.c
> +++ b/src/rpc/virnetsocket.c
> @@ -183,7 +183,8 @@ int virNetSocketCheckProtocols(bool *hasIPv4,
>  
>      if ((gaierr = getaddrinfo("::1", NULL, &hints, &ai)) != 0) {
>          if (gaierr == EAI_ADDRFAMILY ||
> -            gaierr == EAI_FAMILY) {
> +            gaierr == EAI_FAMILY ||
> +            gaierr == EAI_NONAME) {
>              *hasIPv6 = false;
>          } else {
>              virReportError(VIR_ERR_INTERNAL_ERROR,

ACK


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]