Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
cdaa7aff
Commit
cdaa7aff
authored
Mar 11, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unbound: add serve-expired option #1405
parent
6e57f407
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
unbound.inc
src/etc/inc/plugins.inc.d/unbound.inc
+3
-1
services_unbound_advanced.php
src/www/services_unbound_advanced.php
+16
-5
No files found.
src/etc/inc/plugins.inc.d/unbound.inc
View file @
cdaa7aff
...
...
@@ -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}
...
...
src/www/services_unbound_advanced.php
View file @
cdaa7aff
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment