Commit cdaa7aff authored by Franco Fichtner's avatar Franco Fichtner

unbound: add serve-expired option #1405

parent 6e57f407
......@@ -280,7 +280,8 @@ EOF;
$verbosity = isset($config['unbound']['log_verbosity']) ? $config['unbound']['log_verbosity'] : 1;
$msgcachesize = !empty($config['unbound']['msgcachesize']) ? $config['unbound']['msgcachesize'] : 4;
$rrsetcachesize = $msgcachesize * 2;
$dnssecstripped = !empty($config['unbound']['dnssecstripped']) ? "yes" : "no";
$dnssecstripped = !empty($config['unbound']['dnssecstripped']) ? 'yes' : 'no';
$serveexpired = !empty($config['unbound']['serveexpired']) ? 'yes' : 'no';
if (isset($config['unbound']['regdhcp'])) {
// include dynamic leases
......@@ -352,6 +353,7 @@ module-config: "{$module_config}"
cache-max-ttl: {$cache_max_ttl}
cache-min-ttl: {$cache_min_ttl}
harden-dnssec-stripped: {$dnssecstripped}
serve-expired: {$serveexpired}
outgoing-num-tcp: {$outgoing_num_tcp}
incoming-num-tcp: {$incoming_num_tcp}
num-queries-per-thread: {$num_queries_per_thread}
......
......@@ -66,6 +66,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['prefetch'] = isset($config['unbound']['prefetch']);
$pconfig['prefetchkey'] = isset($config['unbound']['prefetchkey']);
$pconfig['dnssecstripped'] = isset($config['unbound']['dnssecstripped']);
$pconfig['serveexpired'] = isset($config['unbound']['serveexpired']);
// text fields
foreach ($copy_fields as $fieldname) {
......@@ -85,11 +86,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
} else {
$pconfig = $_POST;
// boolean fields
$config['unbound']['hideidentity'] = !empty($pconfig['hideidentity']);
$config['unbound']['hideversion'] = !empty($pconfig['hideversion']);
$config['unbound']['prefetch'] = !empty($pconfig['prefetch']);
$config['unbound']['prefetchkey'] = !empty($pconfig['prefetchkey']);
$config['unbound']['dnssecstripped'] = !empty($pconfig['dnssecstripped']);
$config['unbound']['hideidentity'] = !empty($pconfig['hideidentity']);
$config['unbound']['hideversion'] = !empty($pconfig['hideversion']);
$config['unbound']['prefetch'] = !empty($pconfig['prefetch']);
$config['unbound']['prefetchkey'] = !empty($pconfig['prefetchkey']);
$config['unbound']['dnssecstripped'] = !empty($pconfig['dnssecstripped']);
$config['unbound']['serveexpired'] = !empty($pconfig['serveexpired']);
// text fields
foreach ($copy_fields as $fieldname) {
$config['unbound'][$fieldname] = $pconfig[$fieldname];
......@@ -175,6 +177,15 @@ include_once("head.inc");
</div>
</td>
</tr>
<tr>
<td><a id="help_for_serveexpired" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <? gettext('Serve expired responses') ?></td>
<td>
<input name="serveexpired" type="checkbox" id="serveexpired" value="yes" <?= empty($pconfig['serveexpired']) ? '' : 'checked="checked"' ?> />
<div class="hidden" for="help_for_serveexpired">
<?= gettext('Serve expired responses from the cache with a TTL of 0 without waiting for the actual resolution to finish.') ?>
</div>
</td>
</tr>
<tr>
<td><a id="help_for_msgcachesize" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?= gettext("Message Cache Size") ?></td>
<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