* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: resolver.c,v 1.384.14.8 2009/02/25 22:47:12 marka Exp $ */
+/* $Id: resolver.c,v 1.384.14.9 2009/02/27 23:05:22 marka Exp $ */
/*! \file */
* is used for EDNS0 black hole detection.
*/
unsigned int timeouts;
+
/*%
* Look aside state for DS lookups.
*/
unsigned int adberr;
unsigned int findfail;
unsigned int valfail;
+ isc_boolean_t timeout;
};
#define FCTX_MAGIC ISC_MAGIC('F', '!', '!', '!')
query->options |= DNS_FETCHOPT_NOEDNS0;
/*
- * Handle UDP timeouts by reducing the UDP response size to 512
- * bytes then if that doesn't work disabling EDNS (includes DO)
- * and CD.
+ * Handle timeouts by reducing the UDP response size to 512 bytes
+ * then if that doesn't work disabling EDNS (includes DO) and CD.
*
* These timeout can be due to:
* * broken nameservers that don't respond to EDNS queries.
* or CD.
* * packet loss / link outage.
*/
- if ((query->options & DNS_FETCHOPT_TCP) == 0) {
+ if (fctx->timeout) {
if ((triededns512(fctx, &query->addrinfo->sockaddr) ||
fctx->timeouts >= (MAX_EDNS0_TIMEOUTS * 2)) &&
(query->options & DNS_FETCHOPT_NOEDNS0) == 0) {
fctx->reason = "reducing the advertised EDNS UDP "
"packet size to 512 octets";
}
+ fctx->timeout = ISC_FALSE;
}
/*
isc_result_t result;
fctx->timeouts++;
+ fctx->timeout = ISC_TRUE;
/*
* We could cancel the running queries here, or we could let
* them keep going. Since we normally use separate sockets for
fctx->reason = NULL;
fctx->rand_buf = 0;
fctx->rand_bits = 0;
+ fctx->timeout = ISC_FALSE;
dns_name_init(&fctx->nsname, NULL);
fctx->nsfetch = NULL;
}
fctx->timeouts = 0;
+ fctx->timeout = ISC_FALSE;
/*
* XXXRTH We should really get the current time just once. We