aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/dns-stuff.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dirmngr/dns-stuff.c3
1 files changed, 2 insertions, 1 deletions
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);