mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 05:09:59 -04:00
Don't enable serve-stale on duplicate queries
When checking if we should enable serve-stale, add an early out case when the result is an error signalling a duplicate query or a query that would be dropped. (cherry picked from commit 059a4c2f4d9d3cff371842f43208d021509314fa)
This commit is contained in:
parent
18bdce8477
commit
5e908a988f
1 changed files with 8 additions and 0 deletions
|
|
@ -7575,6 +7575,14 @@ query_usestale(query_ctx_t *qctx, isc_result_t result) {
|
|||
return (false);
|
||||
}
|
||||
|
||||
if (result == DNS_R_DUPLICATE || result == DNS_R_DROP) {
|
||||
/*
|
||||
* Don't enable serve-stale if the result signals a duplicate
|
||||
* query or query that is being dropped.
|
||||
*/
|
||||
return (false);
|
||||
}
|
||||
|
||||
qctx_clean(qctx);
|
||||
qctx_freedata(qctx);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue