]> git.ipfire.org Git - thirdparty/bind9.git/commit
Rework dbiterator implementation
authorMatthijs Mekking <matthijs@isc.org>
Wed, 7 Feb 2024 13:52:59 +0000 (14:52 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 6 Mar 2024 09:49:02 +0000 (10:49 +0100)
commitcdf62a18e7791b6cef1a5fd477220c5876f7e4e5
tree1a7fa176b9637b816d3dbcdba8c5562bd269b5fb
parent6df391d6109e087a96e9c98313af78d04d58ae90
Rework dbiterator implementation

If the iterator is paused, the tree is unlocked and may change.

In an RBT tree it's always possible to resume iteration as long
as a valid node pointer was still held, but now that the underlying
database structure is a QP trie, the iterator needs to be initialized
based on the existing structure of the trie or it will return
inconsistent results. We now call dns_qp_lookup() to reinitialize
the QP iterator whenever dbiterator_next() or dbiterator_prev() is
called on a paused iterator.
lib/dns/qpdb.c