*/
unsigned int nqueries; /* Bucket lock. */
- /*%
- * The reason to print when logging a successful
- * response to a query.
- */
- const char *reason;
-
/*%
* Random numbers to use for mixing up server addresses.
*/
}
}
-static inline void
-log_edns(fetchctx_t *fctx) {
- char domainbuf[DNS_NAME_FORMATSIZE];
-
- if (fctx->reason == NULL) {
- return;
- }
-
- /*
- * We do not know if fctx->domain is the actual domain the record
- * lives in or a parent domain so we have a '?' after it.
- */
- dns_name_format(&fctx->domain, domainbuf, sizeof(domainbuf));
- isc_log_write(dns_lctx, DNS_LOGCATEGORY_EDNS_DISABLED,
- DNS_LOGMODULE_RESOLVER, ISC_LOG_INFO,
- "success resolving '%s' (in '%s'?) after %s", fctx->info,
- domainbuf, fctx->reason);
-}
-
static void
fctx_done(fetchctx_t *fctx, isc_result_t result, int line) {
dns_resolver_t *res;
res = fctx->res;
if (result == ISC_R_SUCCESS) {
- /*%
- * Log any deferred EDNS timeout messages.
- */
- log_edns(fctx);
no_response = true;
if (fctx->qmin_warning != ISC_R_SUCCESS) {
isc_log_write(dns_lctx, DNS_LOGCATEGORY_LAME_SERVERS,
}
fctx->qmin_warning = ISC_R_SUCCESS;
- fctx->reason = NULL;
fctx_stopqueries(fctx, no_response, age_untried);
query->addrinfo);
} else if (tried->count >= 2U) {
query->options |= DNS_FETCHOPT_EDNS512;
- fctx->reason = "reducing the advertised EDNS "
- "UDP packet size to 512 octets";
}
}
}
inc_stats(fctx->res, dns_resstatscounter_querytimeout);
if (event->ev_type == ISC_TIMEREVENT_LIFE) {
- fctx->reason = NULL;
fctx_done(fctx, ISC_R_TIMEDOUT, __LINE__);
} else {
isc_result_t result;
atomic_init(&fctx->attributes, 0);
fctx->spilled = false;
fctx->nqueries = 0;
- fctx->reason = NULL;
fctx->rand_buf = 0;
fctx->rand_bits = 0;
fctx->timeout = false;