unsigned int options; /* DB lookup options */
- bool redirected; /* nxdomain redirected? */
- bool is_zone; /* is DB a zone DB? */
+ bool redirected; /* nxdomain redirected? */
+ bool is_zone; /* is DB a zone DB? */
bool is_staticstub_zone;
- bool resuming; /* resumed from recursion? */
+ bool resuming; /* resumed from recursion? */
bool dns64, dns64_exclude, rpz;
- bool authoritative; /* authoritative query? */
- bool want_restart; /* CNAME chain or other
+ bool authoritative; /* authoritative query? */
+ bool want_restart; /* CNAME chain or other
* restart needed */
- bool need_wildcardproof; /* wilcard proof needed */
- bool nxrewrite; /* negative answer from RPZ */
- bool findcoveringnsec; /* lookup covering NSEC */
- bool want_stale; /* want stale records? */
- bool answer_has_ns; /* NS is in answer */
+ bool need_wildcardproof; /* wilcard proof needed */
+ bool nxrewrite; /* negative answer from RPZ */
+ bool findcoveringnsec; /* lookup covering NSEC */
+ bool answer_has_ns; /* NS is in answer */
dns_fixedname_t wildcardname; /* name needing wcard proof */
dns_fixedname_t dsname; /* name needing DS */
qctx->findcoveringnsec = client->view->synthfromdnssec;
qctx->is_staticstub_zone = false;
qctx->nxrewrite = false;
- qctx->want_stale = false;
qctx->answer_has_ns = false;
qctx->authoritative = false;
}
dns_cache_updatestats(qctx->client->view->cache, result);
}
- if (qctx->want_stale) {
+ if ((qctx->client->query.dboptions & DNS_DBFIND_STALEOK) != 0) {
char namebuf[DNS_NAME_FORMATSIZE];
bool success;
qctx->client->query.dboptions &= ~DNS_DBFIND_STALEOK;
- qctx->want_stale = false;
if (dns_rdataset_isassociated(qctx->rdataset) &&
dns_rdataset_count(qctx->rdataset) > 0 &&
STALE(qctx->rdataset)) {
}
if (staleanswersok) {
- qctx->want_stale = true;
qctx->client->query.dboptions |= DNS_DBFIND_STALEOK;
inc_stats(qctx->client, ns_statscounter_trystale);
if (qctx->client->query.fetch != NULL) {