From 6874a5765b887b51e324e1afbddc4516d66a710f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20M=C3=BCller?= Date: Mon, 8 Apr 2019 18:04:00 +0000 Subject: [PATCH] Unbound: do not generate PTR if the user requested not to, do so MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Partially fixes #12030 Signed-off-by: Peter Müller Signed-off-by: Michael Tremer --- src/initscripts/system/unbound | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index af9bcef73c..e87f9e10dd 100644 --- a/src/initscripts/system/unbound +++ b/src/initscripts/system/unbound @@ -172,9 +172,9 @@ own_hostname() { } update_hosts() { - local enabled address hostname domainname + local enabled address hostname domainname generateptr - while IFS="," read -r enabled address hostname domainname; do + while IFS="," read -r enabled address hostname domainname generateptr; do [ "${enabled}" = "on" ] || continue # Build FQDN @@ -185,6 +185,9 @@ update_hosts() { # Skip reverse resolution if the address equals the GREEN address [ "${address}" = "${GREEN_ADDRESS}" ] && continue + # Skip reverse resolution if user requested not to do so + [ "${generateptr}" = "off" ] && continue + # Add RDNS address=$(ip_address_revptr ${address}) unbound-control -q local_data "${address} ${LOCAL_TTL} IN PTR ${fqdn}" -- 2.39.2