diff options
author | Werner Koch <wk@gnupg.org> | 2015-10-25 16:38:07 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-10-25 16:47:12 +0100 |
commit | 5e7ac031f513ad3b60e4f092fa72b3bec0676515 (patch) | |
tree | 6a791e2b779b16e385864bbca2eb511054fa6c29 /dirmngr/t-http.c | |
parent | dirmngr: Better handle systems without IPv6 or IPv4. (diff) | |
download | gnupg2-5e7ac031f513ad3b60e4f092fa72b3bec0676515.tar.xz gnupg2-5e7ac031f513ad3b60e4f092fa72b3bec0676515.zip |
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 <wk@gnupg.org>
Diffstat (limited to 'dirmngr/t-http.c')
-rw-r--r-- | dirmngr/t-http.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 <sys/types.h> #include <sys/stat.h> #include <unistd.h> +#include <assuan.h> #include "util.h" #include "logging.h" |