From acbd63db3dfb089782d06c78fd795b7e68296b7a Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 7 Jun 2016 08:57:39 +0200 Subject: [PATCH] dns: fix unbound custom options PR: https://forum.opnsense.org/index.php?topic=3137.0 --- src/etc/inc/unbound.inc | 10 +++------- src/www/services_unbound.php | 13 +++++++------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/etc/inc/unbound.inc b/src/etc/inc/unbound.inc index ef68e11fb..063b7ecbb 100644 --- a/src/etc/inc/unbound.inc +++ b/src/etc/inc/unbound.inc @@ -209,13 +209,9 @@ EOF; unbound_acls_config(); // Add custom Unbound options - if ($config['unbound']['custom_options']) { - $custom_options = "# Unbound custom option\n"; - foreach (preg_split('/\s+/', $config['unbound']['custom_options']) as $ent) { - $custom_options .= $ent."\n"; - } - } else { - $custom_options = ""; + $custom_options = ''; + if (!empty($config['unbound']['custom_options'])) { + $custom_options = "# Unbound custom options\n{$config['unbound']['custom_options']}\n"; } // Server configuration variables diff --git a/src/www/services_unbound.php b/src/www/services_unbound.php index b50e322e0..22ad8fca6 100644 --- a/src/www/services_unbound.php +++ b/src/www/services_unbound.php @@ -242,12 +242,13 @@ include_once("head.inc"); - - -
-
-
- + + + + +