mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
handle empty answers as EAI_ADDRFAMILY
Signed-off-by: Kirill Rodriguez <theoden8@gmail.com>
This commit is contained in:
parent
822502d72d
commit
7d0836c2b8
5
evdns.c
5
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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user