]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Don't disable RPZ and CATZ for zones with an $INCLUDE statement
authorAram Sargsyan <aram@isc.org>
Wed, 25 Dec 2024 14:30:53 +0000 (14:30 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Wed, 8 Jan 2025 14:00:55 +0000 (14:00 +0000)
The code in zone_startload() disables RPZ and CATZ for a zone if
dns_master_loadfile() returns anything other than ISC_R_SUCCESS,
which makes sense, but it's an error because zone_startload() can
also return DNS_R_SEENINCLUDE upon success when the zone had an
$INCLUDE statement.

lib/dns/zone.c

index 00e2bdb55d92f1259e3b5c9a21e9f7ccd29cb696..c2b8186f4d5048f8457b5e74098f7717a21f3e26 100644 (file)
@@ -2657,13 +2657,13 @@ zone_startload(dns_db_t *db, dns_zone_t *zone, isc_time_t loadtime) {
        }
 
 cleanup:
-       if (result != ISC_R_SUCCESS) {
+       if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) {
                dns_zone_rpz_disable_db(zone, load->db);
                dns_zone_catz_disable_db(zone, load->db);
        }
 
        tresult = dns_db_endload(db, &load->callbacks);
-       if (result == ISC_R_SUCCESS) {
+       if (result == ISC_R_SUCCESS || result == DNS_R_SEENINCLUDE) {
                result = tresult;
        }