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)
committerDmitry Belyavskiy <beldmit@gmail.com>
Sat, 10 Jul 2021 15:59:00 +0000 (17:59 +0200)
commit15729bef385211bc2a0497e2d53a45c45d677d2c
tree8ca87e820aabc6173449c2d98743530f39c50c0c
parent6bfd3e51c04faa97ed98f38e35bd9bb5294b9070
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: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/16033)
crypto/bio/bio_addr.c