From 7e470ec60b59ad87272dd79e25de9f6583498b95 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 21 Mar 2023 09:09:09 +0100 Subject: [PATCH] unbound: according to model this value is required/has a default For the function maybe it's better to pass a model than read MVC data via legacy config access. --- src/etc/inc/plugins.inc.d/unbound.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/etc/inc/plugins.inc.d/unbound.inc b/src/etc/inc/plugins.inc.d/unbound.inc index 2d30f14bf..8c1967306 100644 --- a/src/etc/inc/plugins.inc.d/unbound.inc +++ b/src/etc/inc/plugins.inc.d/unbound.inc @@ -385,16 +385,17 @@ function unbound_configure_do($verbose = false, $unused = '') service_log("done.\n", $verbose); } -function unbound_add_host_entries($ifconfig_details = null) +function unbound_add_host_entries($ifconfig_details) { global $config; + $general = config_read_array('OPNsense', 'unboundplus', 'general'); $ptr_records = ['127.0.0.1', '::1']; - openlog("unbound", LOG_DAEMON, LOG_LOCAL4); + openlog('unbound', LOG_DAEMON, LOG_LOCAL4); - $local_zone_type = $general['local_zone_type'] ?? 'transparent'; + $local_zone_type = $general['local_zone_type']; $unbound_entries = "local-zone: \"{$config['system']['domain']}\" {$local_zone_type}\n";