]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix catz db update callback registration logic error (take two)
authorAram Sargsyan <aram@isc.org>
Thu, 9 Nov 2023 08:33:35 +0000 (08:33 +0000)
committerAram Sargsyan <aram@isc.org>
Tue, 14 Nov 2023 08:59:48 +0000 (08:59 +0000)
commitc584899b1ac2abf1c8a84b3af26b939cfff12da2
treebc1ecd708f83837e47330f0cef11a8e4dedae81e
parent4b419cec95e0df740b297275baceb6bb8775e485
Fix catz db update callback registration logic error (take two)

Please see the 998765fea536daacfba96d8ed0a4855668d2e242 commit for
the description of the original issue. The commit had fixed the
logic error, but it was reintroduced again later with the
a1afa31a5a7d318508efe5a32001104d094be057 commit, where the check of
the 'db_registered' flag was removed in dns__catz_update_cb(). The
check was removed, because the registration function was made
idempotent, so double registration is not an issue, but the check
also prevented from unneeded registration, on which the original
fix relied.

This commit just removes the update callback registration code from
the dns__catz_update_cb() function instead of bringing back the check,
because after code flow analysis, it is now clear that it's not required
at all. The "call onupdate() artificially" comment (which was mentioned
by the removed code) is speaking about the dns_catz_dbupdate_callback()
function, which is called by server.c on (re)configuration, and that
function already takes care of update callback's registration since the
998765fea536daacfba96d8ed0a4855668d2e242 commit was applied, so there
is no need to do that here again.
lib/dns/catz.c