Home GnuPG
Diffusion GnuPG 5e7ac031f513

dirmngr: Add workaround for broken getaddrinfo.
5e7ac031f513Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

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>

Details

Provenance
wernerAuthored on Oct 25 2015, 4:38 PM
Parents
rG0e3c9f184a5f: dirmngr: Better handle systems without IPv6 or IPv4.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG5e7ac031f513: dirmngr: Add workaround for broken getaddrinfo. (authored by Werner Koch <wk@gnupg.org>).Oct 25 2015, 4:47 PM