mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-24 18:03:06 +02:00
Unbound: do not generate PTR if the user requested not to, do so
Partially fixes #12030 Signed-off-by: Peter Müller <peter.mueller@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
5b2ec053c2
commit
6874a5765b
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user