bind9/lib/dns
Michał Kępień 7680c7d1cf Fix reloading inline-signed zones
While "rndc reload" causes dns_zone_asyncload() to be called for the
signed version of an inline-signed zone, the subsequent zone_load() call
causes the raw version to be reloaded from storage.  This means that
DNS_ZONEFLG_LOADPENDING gets set for the signed version of the zone by
dns_zone_asyncload() before the reload is attempted, but zone_postload()
is only called for the raw version and thus DNS_ZONEFLG_LOADPENDING is
cleared for the raw version, but not for the signed version.  This in
turn prevents zone maintenance from happening for the signed version of
the zone.

Until commit 7c64547d95, this problem
remained dormant because DNS_ZONEFLG_LOADPENDING was previously
immediately, unconditionally cleared after zone loading was started
(whereas it should only be cleared when zone loading is finished or an
error occurs).  This behavior caused other issues [1] and thus had to be
changed.

Fix reloading inline-signed zones by clearing DNS_ZONEFLG_LOADPENDING
for the signed version of the zone once the raw version reload
completes.  Take care not to clear it prematurely during initial zone
load.  Also make sure that DNS_ZONEFLG_LOADPENDING gets cleared when
zone_postload() encounters an error or returns early, to prevent other
scenarios from resulting in the same problem.  Add comments aiming to
help explain code flow.

[1] see RT #47076

(cherry picked from commit 5431583971)
2018-08-22 11:45:24 +02:00
..
include Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
rdata Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
tests add missing ATF_REQUIRE 2018-08-14 09:15:52 -07:00
win32 Add dns_zone_logv() 2018-06-11 12:50:11 +02:00
.gitignore 4394. [func] Add rndc command "dnstap-reopen" to close and 2016-06-24 09:37:04 +10:00
acl.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
adb.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
api prep 9.12.2-P1 2018-08-08 14:24:15 -07:00
Atffile 3043. [test] Merged in the NetBSD ATF test framework (currently 2011-02-26 02:26:33 +00:00
badcache.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
byaddr.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
cache.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
callbacks.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
catz.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
client.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
clientinfo.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:38:02 +01:00
compress.c Remove duplicate config.h 2018-08-10 11:17:51 +02:00
db.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
dbiterator.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
dbtable.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
diff.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
dispatch.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
dlz.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
dns64.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
dnsrps.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
dnssec.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
dnstap.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
dnstap.proto [master] dnstap 2015-10-02 12:32:42 -07:00
ds.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
dst_api.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
dst_gost.h Update license headers to not include years in copyright in all applicable files 2018-02-23 10:38:02 +01:00
dst_internal.h Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
dst_lib.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
dst_openssl.h Use standard OPENSSL_NO_ENGINE instead of custom USE_ENGINE define 2018-05-03 21:36:46 +02:00
dst_parse.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
dst_parse.h Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
dst_pkcs11.h Update license headers to not include years in copyright in all applicable files 2018-02-23 10:38:02 +01:00
dst_result.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
dyndb.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
ecdb.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
ecs.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:38:02 +01:00
fixedname.c Add a dns_fixedname_initname() helper function 2018-04-10 13:06:43 -07:00
forward.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
gen-unix.h Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
gen-win32.h Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
gen.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
geoip.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
gssapi_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
gssapictx.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
hmac_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
ipkeylist.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-09 18:30:20 +02:00
iptable.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
journal.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
key.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
keydata.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-09 18:30:20 +02:00
keytable.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
Kyuafile regen v9_12 2017-12-29 02:16:29 +00:00
lib.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
log.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
lookup.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
Makefile.in Add a dns_fixedname_initname() helper function 2018-04-10 13:06:43 -07:00
mapapi [master] mapapi should have been bumped when rbtdb changed 2017-10-20 09:39:55 -07:00
master.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
masterdump.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
message.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
name.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
ncache.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
nsec.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
nsec3.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
nta.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
openssl_link.c Do not remove errors from the OpenSSL error queue in toresult() 2018-08-14 12:53:18 +02:00
openssldh_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
openssldsa_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
opensslecdsa_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
openssleddsa_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
opensslgost_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
opensslrsa_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
order.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
peer.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
pkcs11.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:38:02 +01:00
pkcs11dh_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
pkcs11dsa_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
pkcs11ecdsa_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
pkcs11eddsa_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
pkcs11gost_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
pkcs11rsa_link.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
portlist.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
private.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
rbt.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
rbtdb.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
rbtdb.h Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
rbtdb64.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:38:02 +01:00
rbtdb64.h Update license headers to not include years in copyright in all applicable files 2018-02-23 10:38:02 +01:00
rcode.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
rdata.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
rdatalist.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
rdatalist_p.h Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
rdataset.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
rdatasetiter.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
rdataslab.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
request.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
resolver.c Do not treat a referral with a non-empty ANSWER section as an error 2018-08-22 10:16:08 +02:00
result.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:38:02 +01:00
rootns.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
rpz.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
rriterator.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-09 18:30:20 +02:00
rrl.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
sdb.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
sdlz.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
soa.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-09 18:30:20 +02:00
spnego.asn1 Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
spnego.c Remove duplicate config.h 2018-08-10 11:17:51 +02:00
spnego.h Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
spnego_asn1.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
spnego_asn1.pl Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
ssu.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
ssu_external.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
stats.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
tcpmsg.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-09 18:30:20 +02:00
time.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-09 18:30:20 +02:00
timer.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
tkey.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
tsec.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
tsig.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
tsig_p.h Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
ttl.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
update.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
validator.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
version.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:19:35 +02:00
view.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
xfrin.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
zone.c Fix reloading inline-signed zones 2018-08-22 11:45:24 +02:00
zone_p.h Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
zonekey.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00
zt.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 11:17:51 +02:00