aboutsummaryrefslogtreecommitdiffstats
path: root/config/unbound/unbound.inc
diff options
context:
space:
mode:
Diffstat (limited to 'config/unbound/unbound.inc')
-rw-r--r--config/unbound/unbound.inc22
1 files changed, 10 insertions, 12 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index d8520390..342b1f2b 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -450,8 +450,8 @@ EOF;
$harden_dnssec_stripped = ($adv_config['harden_dnssec_stripped'] == "on") ? "yes" : "no";
$prefetch = ($adv_config['prefetch'] == "on") ? "yes" : "no";
$prefetch_key = ($adv_config['prefetch_key'] == "on") ? "yes" : "no";
- $outgoing_num_tcp = (!empty($adv_config['outgoing_num_tcp'])) ? $adv_config['outgoing_num_tcp'] : "10";
- $incoming_num_tcp = (!empty($adv_config['incoming_num_tcp'])) ? $adv_config['incoming_num_tcp'] : "10";
+ $outgoing_num_tcp = isset($adv_config['outgoing_num_tcp']) ? $adv_config['outgoing_num_tcp'] : "10";
+ $incoming_num_tcp = isset($adv_config['incoming_num_tcp']) ? $adv_config['incoming_num_tcp'] : "10";
$edns_buffer_size = (!empty($adv_config['edns_buffer_size'])) ? $adv_config['edns_buffer_size'] : "4096";
$num_queries_per_thread = (!empty($adv_config['num_queries_per_thread'])) ? $adv_config['num_queries_per_thread'] : "4096";
$jostle_timeout = (!empty($adv_config['jostle_timeout'])) ? $adv_config['jostle_timeout'] : "200";
@@ -541,6 +541,14 @@ access-control: ::1 allow
EOD;
+ # Handle custom options
+ if (!empty($adv_config['custom_options'])) {
+ $custom_options = explode(";", ($adv_config['custom_options']));
+ $unbound_conf .= "\n# Unbound Custom options\n";
+ foreach ($custom_options as $ent)
+ $unbound_conf .= $ent."\n";
+ }
+
// Set up forward-zones if configured
if ($unbound_config['forwarding_mode'] == "on") {
$dnsservers = array();
@@ -569,16 +577,6 @@ EOD;
}
}
-
- # Handle custom options
- if (!empty($adv_config['custom_options'])) {
- $custom_options = explode(";", ($unbound_config['custom_options']));
- $unbound_conf .= "\n# Unbound Custom options\n";
- foreach ($custom_options as $ent) {
- $unbound_conf .= $ent."\n";
- }
- }
-
$unbound_conf .= <<<EOD
###