summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/crypto/bio/b_addr.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/openssl/openssl/crypto/bio/b_addr.c')
-rw-r--r--deps/openssl/openssl/crypto/bio/b_addr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/deps/openssl/openssl/crypto/bio/b_addr.c b/deps/openssl/openssl/crypto/bio/b_addr.c
index 4395ab7a06..f295b766fa 100644
--- a/deps/openssl/openssl/crypto/bio/b_addr.c
+++ b/deps/openssl/openssl/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;