Commit 51967f98 authored by Simon Kelley's avatar Simon Kelley

SERVFAIL is an expected error return, don't try all servers.

parent b37f8b99
...@@ -751,7 +751,7 @@ void reply_query(int fd, int family, time_t now) ...@@ -751,7 +751,7 @@ void reply_query(int fd, int family, time_t now)
if ((forward->sentto->flags & SERV_TYPE) == 0) if ((forward->sentto->flags & SERV_TYPE) == 0)
{ {
if (RCODE(header) == SERVFAIL || RCODE(header) == REFUSED) if (RCODE(header) == REFUSED)
server = NULL; server = NULL;
else else
{ {
...@@ -774,8 +774,7 @@ void reply_query(int fd, int family, time_t now) ...@@ -774,8 +774,7 @@ void reply_query(int fd, int family, time_t now)
we get a good reply from another server. Kill it when we've we get a good reply from another server. Kill it when we've
had replies from all to avoid filling the forwarding table when had replies from all to avoid filling the forwarding table when
everything is broken */ everything is broken */
if (forward->forwardall == 0 || --forward->forwardall == 1 || if (forward->forwardall == 0 || --forward->forwardall == 1 || RCODE(header) != SERVFAIL)
(RCODE(header) != REFUSED && RCODE(header) != SERVFAIL))
{ {
int check_rebind = 0, no_cache_dnssec = 0, cache_secure = 0; int check_rebind = 0, no_cache_dnssec = 0, cache_secure = 0;
...@@ -788,7 +787,7 @@ void reply_query(int fd, int family, time_t now) ...@@ -788,7 +787,7 @@ void reply_query(int fd, int family, time_t now)
no_cache_dnssec = 1; no_cache_dnssec = 1;
#ifdef HAVE_DNSSEC #ifdef HAVE_DNSSEC
if (option_bool(OPT_DNSSEC_VALID) && !(forward->flags & FREC_CHECKING_DISABLED)) if (server && option_bool(OPT_DNSSEC_VALID) && !(forward->flags & FREC_CHECKING_DISABLED))
{ {
int status; int status;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment