bind9/lib
Mark Andrews 63145fb1d3 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.
2021-10-15 04:31:37 +00:00
..
bind9 Add {krb5,ms}-subdomain-self-rhs update policy rules 2021-10-15 11:18:41 +11:00
dns Prevent existing catalog zone entries being incorrectly deleted 2021-10-15 04:31:37 +00:00
irs Check parsed resconf values 2021-08-12 09:52:52 -07:00
isc Stop providing branch prediction information 2021-10-14 10:33:24 +02:00
isccc Use #pragma once as header guards 2021-10-13 00:49:15 -07:00
isccfg Add {krb5,ms}-subdomain-self-rhs update policy rules 2021-10-15 11:18:41 +11:00
ns Add {krb5,ms}-subdomain-self-rhs update policy rules 2021-10-15 11:18:41 +11:00
.gitignore The isc/platform.h header has been completely removed 2021-07-06 05:33:48 +00:00
Makefile.am move samples/resolve.c to bin/tests/system 2021-04-16 14:29:43 +02:00
unit-test-driver.sh.in Enforce a run time limit on unit test binaries 2021-04-07 11:41:45 +02:00