{% set filtertype = filtertype | default("aaaa") %}
{% set family = family | default("v4") %}

options {
	query-source address 10.53.0.4;
	notify-source 10.53.0.4;
	transfer-source 10.53.0.4;
	port @PORT@;
	pid-file "named.pid";
	listen-on { 10.53.0.4; };
	listen-on-v6 { fd92:7065:b8e:ffff::4; };
	recursion no;
	dnssec-validation no;
	notify yes;
	minimal-responses no;
};

{% if family == "v6" %}
	plugin query "@TOP_BUILDDIR@/filter-@filtertype@.@DYLIB@" {
		filter-@filtertype@-on-v6 break-dnssec;
		filter-@filtertype@ { fd92:7065:b8e:ffff::4; };
	};
{% else %}
	plugin query "@TOP_BUILDDIR@/filter-@filtertype@.@DYLIB@" {
		filter-@filtertype@-on-v4 break-dnssec;
		filter-@filtertype@ { 10.53.0.4; };
	};
{% endif %}

key rndc_key {
	secret "1234abcd8765";
	algorithm @DEFAULT_HMAC@;
};

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

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

zone "signed" {
	type primary;
	file "signed.db.signed";
	{% if family == "v6" %}
		plugin query "@TOP_BUILDDIR@/filter-@filtertype@.@DYLIB@" {
			filter-@filtertype@-on-v6 break-dnssec;
			filter-@filtertype@ { fd92:7065:b8e:ffff::4; };
		};
	{% else %}
		plugin query "@TOP_BUILDDIR@/filter-@filtertype@.@DYLIB@" {
			filter-@filtertype@-on-v4 break-dnssec;
			filter-@filtertype@ { 10.53.0.4; };
		};
	{% endif %}
};

zone "unsigned" {
	type primary;
	file "unsigned.db";
	{% if family == "v6" %}
		plugin query "@TOP_BUILDDIR@/filter-@filtertype@.@DYLIB@" {
			filter-@filtertype@-on-v6 break-dnssec;
			filter-@filtertype@ { fd92:7065:b8e:ffff::4; };
		};
	{% else %}
		plugin query "@TOP_BUILDDIR@/filter-@filtertype@.@DYLIB@" {
			filter-@filtertype@-on-v4 break-dnssec;
			filter-@filtertype@ { 10.53.0.4; };
		};
	{% endif %}
};
