]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Unbound: do not generate PTR if the user requested not to, do so
authorPeter Müller <peter.mueller@ipfire.org>
Mon, 8 Apr 2019 18:04:00 +0000 (18:04 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 11 Apr 2019 21:59:42 +0000 (22:59 +0100)
Partially fixes #12030

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/system/unbound

index af9bcef73ce09e24944b88dd5e206d3294a0eb87..e87f9e10dd6f9cbc86b678dd6574799972c501f0 100644 (file)
@@ -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}"