From 8db197ebe8754f6cc29913ab6b4c54fd0f71b560 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 25 Jul 2022 09:31:11 +0200 Subject: [PATCH] unbound: fix two undefined variable warnings --- src/etc/inc/plugins.inc.d/unbound.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/etc/inc/plugins.inc.d/unbound.inc b/src/etc/inc/plugins.inc.d/unbound.inc index d1d1ca22a..9dda8b3d3 100644 --- a/src/etc/inc/plugins.inc.d/unbound.inc +++ b/src/etc/inc/plugins.inc.d/unbound.inc @@ -131,6 +131,7 @@ function unbound_generate_config() $anchor_file = 'auto-trust-anchor-file: /var/unbound/root.key'; } else { $module_config .= 'iterator'; + $anchor_file = ''; } $qnameminstrict = ''; @@ -589,7 +590,7 @@ function unbound_add_host_entries($ifconfig_details = null) $unbound_entries .= "local-data-ptr: \"{$host['ipaddrv6']} {$host['hostname']}.{$host['domain']}\"\n"; $unbound_entries .= "local-data: \"{$host['hostname']}.{$host['domain']} IN AAAA {$host['ipaddrv6']}\"\n"; } - if (!empty($host['descr']) && $unboundcfg['txtsupport'] == 'on') { + if (!empty($host['descr']) && isset($config['unbound']['txtsupport'])) { $unbound_entries .= "local-data: '{$host['hostname']}.{$host['domain']} TXT \"" . addslashes($host['descr']) . "\"'\n"; } }