Don't crash when rndc delzone encounters a catz member
This bug was masked in the tests because the catz
test script did an
rndc addzone
before an rndc delzone
. The addzone
autovivified
the NZF config, so delzone
worked OK.
This commit swaps the order of two sections of the catz
test script
so that it uses delzone
before addzone
, which provokes a crash
when delzone
requires a non-NULL NZF config.
To fix the crash, we now try to remove the zone from the NZF config only if it was dynamically added but not by a catalog zone.
Closes #3745 (closed)
Edited by Tony Finch