[openssl] master update

Richard Levitte levitte at openssl.org
Wed Apr 3 20:57:43 UTC 2019


The branch master has been updated
       via  b8472b4e67ec7ad49254821f2da578ce588df4e6 (commit)
      from  0770c882150ea0159cc2b0a2cea2e8ed8442f36f (commit)


- Log -----------------------------------------------------------------
commit b8472b4e67ec7ad49254821f2da578ce588df4e6
Author: Tomas Mraz <tmraz at fedoraproject.org>
Date:   Thu Mar 21 13:17:29 2019 +0100

    Use AI_ADDRCONFIG hint with getaddrinfo if available.
    
    This prevents failure of openssl s_server socket binding to wildcard
    address on hosts with disabled IPv6.
    
    Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/8550)

-----------------------------------------------------------------------

Summary of changes:
 crypto/bio/b_addr.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c
index 4be74e4..0f39824 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;


More information about the openssl-commits mailing list