The TCP-fallback fix in the previous commits means a query that would
previously have timed out on UDP now actually escalates to TCP, and a
TCP-side failure surfaces a non-ISC_R_TIMEDOUT result code to
query_usestale(). The trigger for DNS_DBFIND_STALESTART was previously
narrowed to ISC_R_TIMEDOUT, so the stale-refresh-time window stopped
opening for those clients.
Broaden the condition to any failure that has already cleared the
upstream DUPLICATE/DROP filtering in query_usestale() — the spirit of
the window is "the resolver tried and could not get a fresh answer",
not "the resolver timed out specifically".
Co-authored-by: Evan Hunt <each@isc.org>
Assisted-by: Claude:claude-opus-4-7
}
/*
- * Start the stale-refresh-time window in case there was a
- * resolver query timeout.
+ * Start the stale-refresh-time window as there appears
+ * to have been a resolver query failure.
*/
- if (qctx->resuming && result == ISC_R_TIMEDOUT) {
+ if (qctx->resuming) {
qctx->client->query.dboptions |= DNS_DBFIND_STALESTART;
}
return true;