1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-10 21:38:50 +01:00

dirmngr: Better handle systems without IPv6 or IPv4.

* dirmngr/dns-stuff.c (resolve_name_standard): Use AI_ADDRCONFIG.
This commit is contained in:
Werner Koch 2015-10-24 16:27:47 +02:00
parent 927f34603d
commit 0e3c9f184a
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -146,8 +146,9 @@ resolve_name_standard (const char *name, unsigned short port,
memset (&hints, 0, sizeof hints); memset (&hints, 0, sizeof hints);
hints.ai_family = want_family; hints.ai_family = want_family;
hints.ai_socktype = want_socktype; hints.ai_socktype = want_socktype;
hints.ai_flags = AI_ADDRCONFIG;
if (r_canonname) if (r_canonname)
hints.ai_flags = AI_CANONNAME; hints.ai_flags |= AI_CANONNAME;
if (port) if (port)
snprintf (portstr, sizeof portstr, "%hu", port); snprintf (portstr, sizeof portstr, "%hu", port);