mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-03 13:59:27 -04:00
[9.20] fix: usr: Fix RPZ race condition during a reconfiguration
With RPZ in use, `named` could terminate unexpectedly because of a race condition when a reconfiguration command was received using `rndc`. This has been fixed. Closes #5146 Backport of MR !10079 Merge branch 'backport-5146-rpz-reconfig-bug-fix-9.20' into 'bind-9.20' See merge request isc-projects/bind9!10144
This commit is contained in:
commit
eca9a3279e
1 changed files with 5 additions and 6 deletions
|
|
@ -6765,14 +6765,13 @@ query_resume(query_ctx_t *qctx) {
|
|||
/*
|
||||
* Has response policy changed out from under us?
|
||||
*/
|
||||
if (qctx->rpz_st->rpz_ver != qctx->view->rpzs->rpz_ver) {
|
||||
if (qctx->view->rpzs == NULL ||
|
||||
qctx->rpz_st->rpz_ver != qctx->view->rpzs->rpz_ver)
|
||||
{
|
||||
ns_client_log(qctx->client, NS_LOGCATEGORY_CLIENT,
|
||||
NS_LOGMODULE_QUERY, DNS_RPZ_INFO_LEVEL,
|
||||
"query_resume: RPZ settings "
|
||||
"out of date "
|
||||
"(rpz_ver %d, expected %d)",
|
||||
qctx->view->rpzs->rpz_ver,
|
||||
qctx->rpz_st->rpz_ver);
|
||||
"query_resume: RPZ settings out of date "
|
||||
"after of a reconfiguration");
|
||||
QUERY_ERROR(qctx, DNS_R_SERVFAIL);
|
||||
return ns_query_done(qctx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue