mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 12:28:19 -04:00
treat SERVERFAILED as a timeout; from tor cvs via Nick Mathewson
svn:r359
This commit is contained in:
parent
5be24333ae
commit
28246587c0
9
evdns.c
9
evdns.c
@ -698,7 +698,6 @@ reply_handle(struct request *const req, u16 flags, u32 ttl, struct reply *reply)
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch(error) {
|
switch(error) {
|
||||||
case DNS_ERR_SERVERFAILED:
|
|
||||||
case DNS_ERR_NOTIMPL:
|
case DNS_ERR_NOTIMPL:
|
||||||
case DNS_ERR_REFUSED:
|
case DNS_ERR_REFUSED:
|
||||||
// we regard these errors as marking a bad nameserver
|
// we regard these errors as marking a bad nameserver
|
||||||
@ -710,6 +709,14 @@ reply_handle(struct request *const req, u16 flags, u32 ttl, struct reply *reply)
|
|||||||
if (!request_reissue(req)) return;
|
if (!request_reissue(req)) return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case DNS_ERR_SERVERFAILED:
|
||||||
|
// rcode 2 (servfailed) sometimes means "we are broken" and
|
||||||
|
// sometimes (with some binds) means "that request was very
|
||||||
|
// confusing." Treat this as a timeout, not a failure.
|
||||||
|
log(EVDNS_LOG_DEBUG, "Got a SERVERFAILED from nameserver %s; "
|
||||||
|
"will allow the request to time out.",
|
||||||
|
debug_ntoa(req->ns->address));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// we got a good reply from the nameserver
|
// we got a good reply from the nameserver
|
||||||
nameserver_up(req->ns);
|
nameserver_up(req->ns);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user