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
bc0fe3d4
Commit
bc0fe3d4
authored
Oct 14, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unbound: real fix for apply glitch
PR:
https://forum.opnsense.org/index.php?topic=1490.0
parent
0714fb3b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
services_unbound.php
src/www/services_unbound.php
+1
-2
services_unbound_acls.php
src/www/services_unbound_acls.php
+2
-1
services_unbound_advanced.php
src/www/services_unbound_advanced.php
+6
-6
No files found.
src/www/services_unbound.php
View file @
bc0fe3d4
...
@@ -84,6 +84,7 @@ if ($_POST) {
...
@@ -84,6 +84,7 @@ if ($_POST) {
system_resolvconf_generate
();
system_resolvconf_generate
();
}
else
{
}
else
{
$pconfig
=
$_POST
;
$pconfig
=
$_POST
;
if
(
isset
(
$_POST
[
'enable'
])
&&
isset
(
$config
[
'dnsmasq'
][
'enable'
]))
if
(
isset
(
$_POST
[
'enable'
])
&&
isset
(
$config
[
'dnsmasq'
][
'enable'
]))
$input_errors
[]
=
"The system dns-forwarder is still active. Disable it before enabling the DNS Resolver."
;
$input_errors
[]
=
"The system dns-forwarder is still active. Disable it before enabling the DNS Resolver."
;
...
@@ -136,8 +137,6 @@ if ($_POST) {
...
@@ -136,8 +137,6 @@ if ($_POST) {
if
(
!
$input_errors
)
{
if
(
!
$input_errors
)
{
write_config
(
"DNS Resolver configured."
);
write_config
(
"DNS Resolver configured."
);
mark_subsystem_dirty
(
'unbound'
);
mark_subsystem_dirty
(
'unbound'
);
header
(
"Location: services_unbound.php"
);
exit
;
}
}
}
}
}
}
...
...
src/www/services_unbound_acls.php
View file @
bc0fe3d4
<?php
<?php
/*
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2011 Warren Baker <warren@decoy.co.za>
Copyright (C) 2011 Warren Baker <warren@decoy.co.za>
...
@@ -93,7 +94,6 @@ if ($act == "edit") {
...
@@ -93,7 +94,6 @@ if ($act == "edit") {
if
(
$_POST
)
{
if
(
$_POST
)
{
$input_errors
=
array
();
$input_errors
=
array
();
$pconfig
=
$_POST
;
if
(
$_POST
[
'apply'
])
{
if
(
$_POST
[
'apply'
])
{
$retval
=
services_unbound_configure
();
$retval
=
services_unbound_configure
();
...
@@ -101,6 +101,7 @@ if ($_POST) {
...
@@ -101,6 +101,7 @@ if ($_POST) {
if
(
$retval
==
0
)
if
(
$retval
==
0
)
clear_subsystem_dirty
(
'unbound'
);
clear_subsystem_dirty
(
'unbound'
);
}
else
{
}
else
{
$pconfig
=
$_POST
;
// input validation - only allow 50 entries in a single ACL
// input validation - only allow 50 entries in a single ACL
for
(
$x
=
0
;
$x
<
50
;
$x
++
)
{
for
(
$x
=
0
;
$x
<
50
;
$x
++
)
{
...
...
src/www/services_unbound_advanced.php
View file @
bc0fe3d4
<?php
<?php
/*
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2011 Warren Baker (warren@pfsense.org)
Copyright (C) 2011 Warren Baker <warren@pfsense.org>
All rights reserved.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
modification, are permitted provided that the following conditions are met:
...
@@ -62,14 +63,14 @@ $pconfig['unwanted_reply_threshold'] = $config['unbound']['unwanted_reply_thresh
...
@@ -62,14 +63,14 @@ $pconfig['unwanted_reply_threshold'] = $config['unbound']['unwanted_reply_thresh
$pconfig
[
'log_verbosity'
]
=
isset
(
$config
[
'unbound'
][
'log_verbosity'
])
?
$config
[
'unbound'
][
'log_verbosity'
]
:
"1"
;
$pconfig
[
'log_verbosity'
]
=
isset
(
$config
[
'unbound'
][
'log_verbosity'
])
?
$config
[
'unbound'
][
'log_verbosity'
]
:
"1"
;
if
(
$_POST
)
{
if
(
$_POST
)
{
$pconfig
=
$_POST
;
if
(
$_POST
[
'apply'
])
{
if
(
$_POST
[
'apply'
])
{
$retval
=
services_unbound_configure
();
$retval
=
services_unbound_configure
();
$savemsg
=
get_std_save_message
();
$savemsg
=
get_std_save_message
();
if
(
$retval
==
0
)
if
(
$retval
==
0
)
clear_subsystem_dirty
(
'unbound'
);
clear_subsystem_dirty
(
'unbound'
);
}
else
{
}
else
{
$pconfig
=
$_POST
;
if
(
isset
(
$_POST
[
'hideidentity'
]))
if
(
isset
(
$_POST
[
'hideidentity'
]))
$config
[
'unbound'
][
'hideidentity'
]
=
true
;
$config
[
'unbound'
][
'hideidentity'
]
=
true
;
else
else
...
@@ -108,7 +109,6 @@ if ($_POST) {
...
@@ -108,7 +109,6 @@ if ($_POST) {
$config
[
'unbound'
][
'unwanted_reply_threshold'
]
=
$_POST
[
'unwanted_reply_threshold'
];
$config
[
'unbound'
][
'unwanted_reply_threshold'
]
=
$_POST
[
'unwanted_reply_threshold'
];
$config
[
'unbound'
][
'log_verbosity'
]
=
$_POST
[
'log_verbosity'
];
$config
[
'unbound'
][
'log_verbosity'
]
=
$_POST
[
'log_verbosity'
];
write_config
(
"DNS Resolver configured."
);
write_config
(
"DNS Resolver configured."
);
mark_subsystem_dirty
(
'unbound'
);
mark_subsystem_dirty
(
'unbound'
);
}
}
}
}
...
...
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