Your message dated Sun, 18 Dec 2011 15:50:54 +0100
with message-id <[email protected]>
has caused the report #652552,
regarding gnutls28: FTBFS with no IPv6 available at runtime
to be marked as having been forwarded to the upstream software
author(s) [email protected]
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
652552: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652552
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
----- Forwarded message from Pino Toscano <[email protected]> -----
Message-ID: <[email protected]>
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
--- a/src/serv.c
+++ b/src/serv.c
@@ -692,7 +692,7 @@
snprintf (portname, sizeof (portname), "%d", listen_port);
memset (&hints, 0, sizeof (hints));
hints.ai_socktype = socktype;
- hints.ai_flags = AI_PASSIVE;
+ hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
if ((s = getaddrinfo (NULL, portname, &hints, &res)) != 0)
{
--- End Message ---