]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix RPZ bug when resuming a query during a reconfiguration
authorAram Sargsyan <aram@isc.org>
Wed, 5 Feb 2025 09:36:09 +0000 (09:36 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Fri, 21 Feb 2025 11:10:15 +0000 (11:10 +0000)
commit3ea2fbc238e0d933b9f87dfd8fdab9233d978e33
tree9ddc319077e46761dd578665d35440eb3362b2f2
parent7471ef5e1a6afda1c048a46aefe8fd6f7600890d
Fix RPZ bug when resuming a query during a reconfiguration

After a reconfiguration the old view can be left without a valid
'rpzs' member, because when the RPZ is not changed during the named
reconfiguration 'rpzs' "migrate" from the old view into the new
view, so when a query resumes it can find that 'qctx->view->rpzs'
is NULL which query_resume() currently doesn't expect to happen if
it's recursing and 'qctx->rpz_st' is not NULL.

Fix the issue by adding a NULL-check. In order to not split the log
message to two different log messages depending on whether
'qctx->view->rpzs' is NULL or not, change the message to not log
the RPZ policy's "version" which is just a runtime counter and is
most likely not very useful for the users.
lib/ns/query.c