From 6c20cd005454cb8a6fbcd54f2615b82886ae4fbd Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 20 Jan 2021 18:36:53 +0100 Subject: [PATCH] dns/bind: fix slave zone templating (#2193) --- dns/bind/Makefile | 2 +- dns/bind/pkg-descr | 4 ++++ .../src/opnsense/service/templates/OPNsense/Bind/named.conf | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dns/bind/Makefile b/dns/bind/Makefile index 0407be82f..96f13f860 100644 --- a/dns/bind/Makefile +++ b/dns/bind/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= bind -PLUGIN_VERSION= 1.15 +PLUGIN_VERSION= 1.16 PLUGIN_COMMENT= BIND domain name service PLUGIN_DEPENDS= bind916 PLUGIN_MAINTAINER= m.muenz@gmail.com diff --git a/dns/bind/pkg-descr b/dns/bind/pkg-descr index 02fed8ac0..f44901732 100644 --- a/dns/bind/pkg-descr +++ b/dns/bind/pkg-descr @@ -8,6 +8,10 @@ necessary for asking and answering name service questions. Plugin Changelog ================ +1.16 + +* Fix slave zone templating + 1.15 * Add support for "Transfer Source [IP|IPv6]" options diff --git a/dns/bind/src/opnsense/service/templates/OPNsense/Bind/named.conf b/dns/bind/src/opnsense/service/templates/OPNsense/Bind/named.conf index 7196cf2c2..9309033bc 100644 --- a/dns/bind/src/opnsense/service/templates/OPNsense/Bind/named.conf +++ b/dns/bind/src/opnsense/service/templates/OPNsense/Bind/named.conf @@ -120,7 +120,7 @@ zone "rpzbing" { type master; file "/usr/local/etc/namedb/master/bing.db"; notif {% if domain.enabled == '1' %} {% set allow_transfer = helpers.getUUID(domain.allowtransfer) %} {% set allow_query = helpers.getUUID(domain.allowquery) %} -zone "{{ domain.domainname }}" { type {{ domain.type }}; {% if domain.type == 'slave' %}masters { {{ domain.masterip }}; }; {% if domain.allownotifyslave != '' %} allow-notify { {{ domain.allownotifyslave.replace(',', '; ') }}; };{% endif %} file "/usr/local/etc/namedb/slave/{{ domain.domainname }}.db"; {% else %}file "/usr/local/etc/namedb/master/{{ domain.domainname }}.db"; {% endif %}{% if domain.allowtransfer is defined %} allow-transfer { {{ allow_transfer.name }}; };{% endif %}{% if domain.allowquery is defined %} allow-query { {{ allow_query.name }}; };{% endif %} }; +zone "{{ domain.domainname }}" { type {{ domain.type }}; {% if domain.type == 'slave' %}masters { {{ domain.masterip }}; }; {% if domain.allownotifyslave is defined %} allow-notify { {{ domain.allownotifyslave.replace(',', '; ') }}; };{% endif %} file "/usr/local/etc/namedb/slave/{{ domain.domainname }}.db"; {% else %}file "/usr/local/etc/namedb/master/{{ domain.domainname }}.db"; {% endif %}{% if domain.allowtransfer is defined %} allow-transfer { {{ allow_transfer.name }}; };{% endif %}{% if domain.allowquery is defined %} allow-query { {{ allow_query.name }}; };{% endif %} }; {% endif %} {% endfor %} {% endif %}