With =net-proxy/dante-1.4.0-r2, the wrapped getaddrinfo() function: * returns no ipv6 address for hostnames even if both the hostnames and dns servers are ipv6 enabled. * produces the `Address family for hostname not supported' error when ipv6 addresses is provided as the string input. This issues affects downstream software such as irssi (for example, `/connect example.com' and `/connect ::1' will not work, effectively forbidding users to access ipv6 irc servers ;). This issue does not happen with versions 1.1.19-r4, 1.3.2-r1 and 1.4.1. Reproducible: Always Steps to Reproduce: 1. # emerge -v1O '=net-proxy/dante-1.4.0-r2' 2. $ gcc test.c -o test (see below for the source code) 3. $ ./test <<< 'example.com' 4. $ ./test <<< '::1' Actual Results: 3. > 93.184.216.119 4. > getaddrinfo: -9 (Address family for hostname not supported) Expected Results: 3. > 2606:2800:220:6d:26bf:1447:1097:aa7 > 93.184.216.119 4. > ::1 Source code of the test program: #include <string.h> #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <arpa/inet.h> #ifdef HAVE_SOCKS_H #include <socks.h> #endif #define NAME_LEN 250 union sockaddr_union { struct sockaddr sa; struct sockaddr_in sin; struct sockaddr_in6 sin6; }; int main() { char name[NAME_LEN]; while(fgets(name, NAME_LEN, stdin)) { struct addrinfo hints, *ai, *ailist; union sockaddr_union *so; int ret, len; len = strlen(name); if (len != 0 && name[len - 1] == '\n') name[len - 1] = '\0'; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_socktype = SOCK_STREAM; ret = getaddrinfo(name, NULL, &hints, &ailist); if (ret != 0) { fprintf(stderr, "getaddrinfo: %d (%s)\n", ret, gai_strerror(ret)); continue; } for (ai = ailist; ai != NULL; ai = ai->ai_next) { char addr[INET6_ADDRSTRLEN]; union sockaddr_union *so = (union sockaddr_union *)ai->ai_addr; if (!inet_ntop( so->sin.sin_family, (so->sin.sin_family == AF_INET ? (void *)&so->sin.sin_addr.s_addr : (void *)so->sin6.sin6_addr.s6_addr), addr, INET6_ADDRSTRLEN )) perror("inet_ntop"); printf("%s\n", addr); } freeaddrinfo(ailist); } return 0; }
Correction: Step 2 in "steps to reproduce: should be $ gcc -DHAVE_SOCKS_H test.c -o test -lsocks
please retry with 1.4.1
Fixed. Thanks :)