BIO_lookup_ex: use AI_ADDRCONFIG only if explicit host name is given
authorDaiki Ueno <dueno@redhat.com>
Thu, 8 Jul 2021 17:22:36 +0000 (19:22 +0200)
committerPauli <pauli@openssl.org>
Tue, 13 Jul 2021 01:28:04 +0000 (11:28 +1000)
commit474cd196d628b1f91efa32827b403e2c1d896f81
tree849d969d078afd0e0ae100b2686b1349ece0ec6d
parent5b71c677781ca260c8d9968c103d92c44d644007
BIO_lookup_ex: use AI_ADDRCONFIG only if explicit host name is given

The flag only affects which record types are queried via DNS (A or
AAAA, or both).  When node is NULL and AF_UNSPEC is used, it prevents
getaddrinfo returning the right address associated with the loopback
interface.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16039)
crypto/bio/b_addr.c