unbound: fix two undefined variable warnings

This commit is contained in:
Franco Fichtner 2022-07-25 09:31:11 +02:00
parent a02b07a908
commit 8db197ebe8

View File

@ -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";
}
}