summaryrefslogtreecommitdiff
path: root/crypto/bio/b_addr.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2019-05-28 20:08:17 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2019-05-28 20:08:17 +0000
commit375b8e6770f750fb915859470f6f1fe43f35cc48 (patch)
tree5db6744924edfc112439ad2366f52f246baa21d1 /crypto/bio/b_addr.c
parent851f7386fd78b9787f4f6669ad271886a2a003f1 (diff)
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 4395ab7a0683e..f295b766fa734 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;