]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix NSEC3 resalting upon restart
authorMatthijs Mekking <matthijs@isc.org>
Wed, 2 Jun 2021 08:47:57 +0000 (10:47 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 9 Jun 2021 07:14:09 +0000 (09:14 +0200)
commit0ae3ffdc1c1eb7dfe53ac42fafe4664581be2a05
tree37abd4ca10f9c7d79b3b59c4b4fc0f96f916ae79
parent08a9e7add10d53a34ddbbe2e9fe9a9efe3b7494b
Fix NSEC3 resalting upon restart

When named restarts, it will examine signed zones and checks if the
current denial of existence strategy matches the dnssec-policy. If not,
it will schedule to create a new NSEC(3) chain.

However, on startup the zone database may not be read yet, fooling
BIND that the denial of existence chain needs to be created. This
results in a replacement of the previous NSEC(3) chain.

Change the code such that if the NSEC3PARAM lookup failed (the result
did not return in ISC_R_SUCCESS or ISC_R_NOTFOUND), we will try
again later. The nsec3param structure has additional variables to
signal if the lookup is postponed. We also need to save the signal
if an explicit resalt was requested.

In addition to the two added boolean variables, we add a variable to
store the NSEC3PARAM rdata. This may have a yet to be determined salt
value. We can't create the private data yet because there may be a
mismatch in salt length and the NULL salt value.
lib/dns/zone.c