mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-26 19:41:04 -05:00
Address inconsistencies in checking added RRsets
loading_addrdataset() rejects SOA RRsets which are not at top of zone. addrdataset() should similarly reject such RRsets.
This commit is contained in:
parent
ae96ca98f7
commit
ea56069ae0
1 changed files with 7 additions and 0 deletions
|
|
@ -6799,6 +6799,13 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
INSIST(rbtversion == NULL || rbtversion->rbtdb == rbtdb);
|
||||
|
||||
if (rbtdb->common.methods == &zone_methods) {
|
||||
/*
|
||||
* SOA records are only allowed at top of zone.
|
||||
*/
|
||||
if (rdataset->type == dns_rdatatype_soa &&
|
||||
node != rbtdb->origin_node) {
|
||||
return (DNS_R_NOTZONETOP);
|
||||
}
|
||||
RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
|
||||
REQUIRE(((rbtnode->nsec == DNS_RBT_NSEC_NSEC3 &&
|
||||
(rdataset->type == dns_rdatatype_nsec3 ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue