handle empty answers as EAI_ADDRFAMILY

Signed-off-by: Kirill Rodriguez <theoden8@gmail.com>
This commit is contained in:
Greg Hazel 2022-08-14 14:02:48 -07:00 committed by Kirill Rodriguez
parent 822502d72d
commit 7d0836c2b8
No known key found for this signature in database
GPG Key ID: 2AA85EC2AD7F85EA

View File

@ -5698,8 +5698,9 @@ evdns_getaddrinfo_fromhosts(struct evdns_base *base,
EVDNS_UNLOCK(base);
out:
if (n_found) {
/* Note that we return an empty answer if we found entries for
* this hostname but none were of the right address type. */
if (!ai) {
return EVUTIL_EAI_ADDRFAMILY;
}
*res = ai;
return 0;
} else {