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
1 changed files with 2 additions and 1 deletions

View File

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