bind9/lib
Mark Andrews d329d47bae Prevent existing catalog zone entries being incorrectly deleted
After receiving a new version of a catalog zone it is required
to merge it with the old version.

The algorithm walks through the new version's hash table and applies
the following logic:

1. If an entry from the new version does not exist in the old
   version, then it's a new entry, add the entry to the `toadd` hash
   table.
2. If the zone does not exist in the set of configured zones, because
   it was deleted via rndc delzone or it was removed from another
   catalog zone instance, then add into to the `toadd` hash table to
   be reinstantiated.
3. If an entry from the new version also exists in the old version,
   but is modified, then add the entry to the `tomod` hash table, then
   remove it from the old version's hash table.
4. If an entry from the new version also exists in the old version and
   is the same (unmodified) then just remove it from the old version's
   hash table.

The algorithm then deletes all the remaining zones which still exist
in the old version's hash table (because only the ones that don't
exist in the new version should now remain there), then adds the ones
that were added to the `toadd`, and modifies the ones that were added
to the `tomod`, completing the merge.

During a recent refactoring, the part when the entry should be
removed from the old version's hash table on condition (4.) above
was accidentally omitted, so the unmodified zones were remaining
in the old version's hash table and consequently being deleted.

(cherry picked from commit 63145fb1d3)
2021-10-28 00:04:44 +11:00
..
bind9 cleanup references to ancient named.conf options 2021-10-12 23:52:39 -07:00
dns Prevent existing catalog zone entries being incorrectly deleted 2021-10-28 00:04:44 +11:00
irs Update the source code formatting using clang-format-13 2021-10-12 11:31:55 +02:00
isc Add isc_time_add and isc_time_subtract unit test 2021-10-21 09:51:53 +02:00
isccc Update the source code formatting using clang-format-13 2021-10-12 11:31:55 +02:00
isccfg Update the source code formatting using clang-format-13 2021-10-12 11:31:55 +02:00
ns Update the source code formatting using clang-format-13 2021-10-12 11:31:55 +02:00
win32/bindevt update all copyright headers to eliminate the typo 2020-09-14 16:50:58 -07:00
.gitignore added gitignore, removed cvsignore 2012-03-03 23:10:05 -08:00
Kyuafile link in lib/isccc/tests/Kyuafile 2018-11-13 07:23:36 +11:00
Makefile.in move samples/resolve.c to bin/tests/system 2021-04-19 14:32:53 +02:00