diff --git a/CHANGES b/CHANGES index 51c787d615..ffb8e367ff 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4682. [bug] Don't report errors on records below a DNAME. + [RT #44880] + 4680. [bug] Fix failing over to another master server address when nsupdate is used with GSS-API. [RT #45380] diff --git a/bin/tests/system/checkzone/zones/good-occulted-ns-by-dname.db b/bin/tests/system/checkzone/zones/good-occulted-ns-by-dname.db new file mode 100644 index 0000000000..4270a68d86 --- /dev/null +++ b/bin/tests/system/checkzone/zones/good-occulted-ns-by-dname.db @@ -0,0 +1,11 @@ +$TTL 300 +example. SOA marka.isc.org. a.root.servers.nil. ( + 2026 ; serial + 600 ; refresh + 600 ; retry + 1200 ; expire + 600 ; minimum + ) +example. DNAME example.net. ; only the apex record exist +example. NS ns.example.net. ; out of zone +foo.example. NS exavider.example. ; no "address" records diff --git a/bin/tests/system/checkzone/zones/good-occulted-ns-by-ns.db b/bin/tests/system/checkzone/zones/good-occulted-ns-by-ns.db new file mode 100644 index 0000000000..96055f2157 --- /dev/null +++ b/bin/tests/system/checkzone/zones/good-occulted-ns-by-ns.db @@ -0,0 +1,11 @@ +$TTL 300 +example. SOA marka.isc.org. a.root.servers.nil. ( + 2026 ; serial + 600 ; refresh + 600 ; retry + 1200 ; expire + 600 ; minimum + ) +example. NS ns.example.net. ; out of zone +foo.example. NS ns.example.net. ; out of zone +bar.foo.example. NS x.foo.example. ; no address records diff --git a/lib/dns/zone.c b/lib/dns/zone.c index d9d7bb62ce..5e76933122 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -2979,14 +2979,14 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) { * Don't check the NS records at the origin. */ if (dns_name_equal(name, &zone->origin)) - goto checkmx; + goto checkfordname; result = dns_db_findrdataset(db, node, NULL, dns_rdatatype_ns, 0, 0, &rdataset, NULL); if (result != ISC_R_SUCCESS) - goto checkmx; + goto checkfordname; /* - * Remember bottom of zone. + * Remember bottom of zone due to NS. */ dns_name_copy(name, bottom, NULL); @@ -3003,7 +3003,18 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) { dns_rdataset_disassociate(&rdataset); goto next; - checkmx: + checkfordname: + result = dns_db_findrdataset(db, node, NULL, + dns_rdatatype_dname, 0, 0, + &rdataset, NULL); + if (result == ISC_R_SUCCESS) { + /* + * Remember bottom of zone due to DNAME. + */ + dns_name_copy(name, bottom, NULL); + dns_rdataset_disassociate(&rdataset); + } + result = dns_db_findrdataset(db, node, NULL, dns_rdatatype_mx, 0, 0, &rdataset, NULL); if (result != ISC_R_SUCCESS)