[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
build-failure with no IPv6 available at runtime
From: |
Andreas Metzler |
Subject: |
build-failure with no IPv6 available at runtime |
Date: |
Sun, 18 Dec 2011 15:50:54 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
----- Forwarded message from Pino Toscano <address@hidden> -----
Message-ID: <address@hidden>
Package: gnutls28
Version: 3.0.9-2
Severity: important
Tags: patch
Hi,
if the current kernel (be it Linux compiled without it, or Hurd with no
inet6 translator setup) does not provide support for IPv6, two tests,
- dsa/testdsa
- openpgp-certs/testcerts
will fail. This is because gnutls-serv queries (in src/serv.c,
listen_socket()) getaddrinfo() to known all the available addresses
for the specified port, returning even those which cannot be configured
(and for which socket() will fail with EAFNOSUPPORT). At least on Hurd,
the returned list from getaddrinfo() had two elements, first the AF_INET
and then AF_INET6, and given that the return value of the last execution
of socket() returns -1, that is the return value of the whole
listen_socket(), even if the AF_INET socket has been correctly setup.
My solution is adding the AI_ADDRCONFIG flag to the hints for
getaddrinfo(), so it returns only addresses which can be configured.
(See also [1].) This should allow gnutls-serv to listen to both IPv4
and IPv6 if both are available in the system, or just IPv4 if IPv6
cannot be used.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html
Thanks,
--
Pino
getaddrinfo_flags.diff
Description: Text Data
- build-failure with no IPv6 available at runtime,
Andreas Metzler <=