From 0e3c9f184a5fb3e41277700d690febc2eee9600a Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Sat, 24 Oct 2015 16:27:47 +0200 Subject: [PATCH] dirmngr: Better handle systems without IPv6 or IPv4. * dirmngr/dns-stuff.c (resolve_name_standard): Use AI_ADDRCONFIG. --- dirmngr/dns-stuff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c index dc5cb894e..d784ccf97 100644 --- a/dirmngr/dns-stuff.c +++ b/dirmngr/dns-stuff.c @@ -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);