From 5e7ac031f513ad3b60e4f092fa72b3bec0676515 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Sun, 25 Oct 2015 16:38:07 +0100 Subject: dirmngr: Add workaround for broken getaddrinfo. * dirmngr/dns-stuff.c (resolve_name_standard): On failure retry by first resolving the CNAME. (get_dns_cname): New. * dirmngr/t-dns-stuff.c (main): Add option --cname. -- At least the getaddrinfo implementation in glibc 2.19-13 from Debian returns EAI_NONAME if the CNAME points to a too long list of A/AAAA addresses. Looking at the wire the data is correctly returned from the server but getaddrinfo seems to get confused by truncation and retry. To fix this we resolve the CNAME again and call getaddrinfo again with the canonical name. Signed-off-by: Werner Koch --- dirmngr/t-http.c | 1 + 1 file changed, 1 insertion(+) (limited to 'dirmngr/t-http.c') diff --git a/dirmngr/t-http.c b/dirmngr/t-http.c index 816b74490..35858f649 100644 --- a/dirmngr/t-http.c +++ b/dirmngr/t-http.c @@ -36,6 +36,7 @@ #include #include #include +#include #include "util.h" #include "logging.h" -- cgit v1.2.3