/*
 * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 *
 * SPDX-License-Identifier: MPL-2.0
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0.  If a copy of the MPL was not distributed with this
 * file, you can obtain one at https://mozilla.org/MPL/2.0/.
 *
 * See the COPYRIGHT file distributed with this work for additional
 * information regarding copyright ownership.
 */

include "../../_common/rndc.key";

controls {
	inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};

options {
	query-source address 10.53.0.1;
	notify-source 10.53.0.1;
	transfer-source 10.53.0.1;
	port @PORT@;
	pid-file "named.pid";
	listen-on { 10.53.0.1; };
	listen-on-v6 { none; };
	allow-transfer { any; };
	recursion no;
	dnssec-validation no;
	notify yes;
};

zone "." {
	type primary;
	file "root.db";
};

{% if enable_only_axfr_max_idle_time | default(False) %}
zone "axfr-max-idle-time" {
	type primary;
	file "axfr-max-idle-time.db";
};
{% else %}
zone "axfr-min-transfer-rate" {
	type primary;
	file "axfr-min-transfer-rate.db";
};

zone "axfr-max-transfer-time" {
	type primary;
	file "axfr-max-transfer-time.db";
};

zone "axfr-rndc-retransfer-force" {
	type primary;
	file "axfr-rndc-retransfer-force.db";
};

{% if enable_some_zones | default(True) %}
zone "secondary" {
	type primary;
	allow-transfer { 10.53.0.1; 10.53.0.2; 10.53.0.6; 10.53.0.7; };
	file "sec.db";
};

zone "edns-expire" {
	type primary;
	file "edns-expire.db";
};

zone "xot-primary-try-next" {
	type primary;
	file "xot-primary-try-next.db";
};

zone "axfr-too-big" {
	type primary;
	file "axfr-too-big.db";
};

zone "ixfr-too-big" {
	type primary;
	allow-update { any; };
	file "ixfr-too-big.db";
};

zone "xfer-stats" {
	type primary;
	file "xfer-stats.db";
};

zone "dot-fallback" {
	type primary;
	file "dot-fallback.db";
};
{% endif %}
{% endif %}