mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Replace the "mirror" zone option with "type mirror;"
Use a zone's 'type' field instead of the value of its DNS_ZONEOPT_MIRROR option for checking whether it is a mirror zone. This makes said zone option and its associated helper function, dns_zone_mirror(), redundant, so remove them. Remove a check specific to mirror zones from named_zone_reusable() since another check in that function ensures that changing a zone's type prevents it from being reused during reconfiguration.
This commit is contained in:
committed by
Ondřej Surý
parent
e1bb8de6f0
commit
2cb9e8a020
@@ -1095,7 +1095,7 @@ query_validatezonedb(ns_client_t *client, const dns_name_t *name,
|
||||
/*
|
||||
* Mirror zone data is treated as cache data.
|
||||
*/
|
||||
if (dns_zone_ismirror(zone)) {
|
||||
if (dns_zone_gettype(zone) == dns_zone_mirror) {
|
||||
return (query_checkcacheaccess(client, name, qtype, options));
|
||||
}
|
||||
|
||||
@@ -5382,7 +5382,7 @@ ns__query_start(query_ctx_t *qctx) {
|
||||
if (qctx->is_zone) {
|
||||
qctx->authoritative = true;
|
||||
if (qctx->zone != NULL) {
|
||||
if (dns_zone_ismirror(qctx->zone)) {
|
||||
if (dns_zone_gettype(qctx->zone) == dns_zone_mirror) {
|
||||
qctx->authoritative = false;
|
||||
}
|
||||
if (dns_zone_gettype(qctx->zone) ==
|
||||
@@ -7920,7 +7920,8 @@ query_zone_delegation(query_ctx_t *qctx) {
|
||||
|
||||
if (USECACHE(qctx->client) &&
|
||||
(RECURSIONOK(qctx->client) ||
|
||||
(qctx->zone != NULL && dns_zone_ismirror(qctx->zone))))
|
||||
(qctx->zone != NULL &&
|
||||
dns_zone_gettype(qctx->zone) == dns_zone_mirror)))
|
||||
{
|
||||
/*
|
||||
* We might have a better answer or delegation in the
|
||||
|
Reference in New Issue
Block a user