Commit a145de62 authored by Franco Fichtner's avatar Franco Fichtner

dns: fix unbound custom options

PR: https://forum.opnsense.org/index.php?topic=3137.0
(cherry picked from commit acbd63db)
parent 45ce9697
......@@ -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
......
......@@ -242,12 +242,13 @@ include_once("head.inc");
</td>
</tr>
<tr class="showadv" style="display:none">
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Advanced");?></td>
<td>
<strong><?=gettext("Advanced");?><br /></strong>
<textarea rows="6" cols="78" name="custom_options" id="custom_options"><?=$pconfig['custom_options'];?></textarea><br />
<?=gettext("Enter any additional options you would like to add to the DNS Resolver configuration here, separated by a space or newline"); ?><br />
</td>
<td><a id="help_for_custom_options" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?= gettext('Custom options') ?></td>
<td>
<textarea rows="6" cols="78" name="custom_options" id="custom_options"><?=$pconfig['custom_options'];?></textarea>
<div class="hidden" for="help_for_custom_options">
<?=gettext("Enter any additional options you would like to add to the DNS Resolver configuration here."); ?>
</div>
</td>
</tr>
<tr class="showadv" style="display:none">
<td><a id="help_for_outgoing_interface" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Outgoing Network Interfaces"); ?></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment