diff --git a/evdns.c b/evdns.c index 9fabc08c..469f63b6 100644 --- a/evdns.c +++ b/evdns.c @@ -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 {