aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bio/b_addr.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bio/b_addr.c')
-rw-r--r--crypto/bio/b_addr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c
index 4395ab7a0683..f295b766fa73 100644
--- a/crypto/bio/b_addr.c
+++ b/crypto/bio/b_addr.c
@@ -683,6 +683,12 @@ int BIO_lookup_ex(const char *host, const char *service, int lookup_type,
hints.ai_family = family;
hints.ai_socktype = socktype;
hints.ai_protocol = protocol;
+#ifdef AI_ADDRCONFIG
+#ifdef AF_UNSPEC
+ if (family == AF_UNSPEC)
+#endif
+ hints.ai_flags |= AI_ADDRCONFIG;
+#endif
if (lookup_type == BIO_LOOKUP_SERVER)
hints.ai_flags |= AI_PASSIVE;