aboutsummaryrefslogtreecommitdiffstats
path: root/config/unbound
diff options
context:
space:
mode:
Diffstat (limited to 'config/unbound')
-rw-r--r--config/unbound/unbound.inc7
-rw-r--r--config/unbound/unbound.xml2
-rw-r--r--config/unbound/unbound_acls.php50
-rw-r--r--config/unbound/unbound_advanced.xml2
4 files changed, 36 insertions, 25 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index 292a2ae6..26109224 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -258,7 +258,7 @@ function unbound_get_network_interface_addresses() {
$unbound_interfaces[$i]['ipv4']['ipaddr'] = $interfaces[$unboundif]['ipaddr'];
$unbound_interfaces[$i]['ipv4']['subnet'] = $interfaces[$unboundif]['subnet'];
$unbound_interfaces[$i]['ipv4']['network'] = gen_subnet($unbound_interfaces[$i]['ipv4']['ipaddr'],$unbound_interfaces[$i]['ipv4']['subnet']);
-
+
// Check for CARP addresses and also return those - only IPv4 for now
if (isset($config['virtualip'])) {
if(is_array($config['virtualip']['vip'])) {
@@ -384,9 +384,8 @@ function unbound_acls_config() {
}
}
return $unboundcfg;
- } else {
+ } else
return;
- }
}
function unbound_resync_config() {
@@ -404,7 +403,7 @@ function unbound_resync_config() {
foreach($unboundnetcfg as $netent) {
foreach($netent as $entry) {
# If virtual interface then skip
- if (!$entry['network'] && $entry['subnet'])
+ if (!$entry['network'] && !$entry['subnet'])
continue;
$unbound_bind_interfaces .="interface: {$entry['ipaddr']}\n";
if($entry['ipaddr'] != "127.0.0.1" && $entry['ipaddr'] != "::1" )
diff --git a/config/unbound/unbound.xml b/config/unbound/unbound.xml
index f8c33582..202e8451 100644
--- a/config/unbound/unbound.xml
+++ b/config/unbound/unbound.xml
@@ -40,7 +40,7 @@
<requirements/>
<faq/>
<name>unbound</name>
- <version>1.4.8</version>
+ <version>1.4.14</version>
<title>Services: Unbound DNS Forwarder: Basic Settings</title>
<include_file>/usr/local/pkg/unbound.inc</include_file>
<menu>
diff --git a/config/unbound/unbound_acls.php b/config/unbound/unbound_acls.php
index 7e4e5a71..a7c3ea9e 100644
--- a/config/unbound/unbound_acls.php
+++ b/config/unbound/unbound_acls.php
@@ -98,22 +98,32 @@ if ($_POST) {
if (!$input_errors) {
- if(!$a_acls[$id])
- $a_acls[$id]['aclid'] = $id;
-
- if (isset($id) && $a_acls[$id]) {
- $a_acls[$id]['aclid'] = $pconfig['aclid'];
- $a_acls[$id]['aclname'] = $pconfig['aclname'];
- $a_acls[$id]['aclaction'] = $pconfig['aclaction'];
- $a_acls[$id]['description'] = $pconfig['description'];
- $a_acls[$id]['row'] = array();
- foreach ($networkacl as $acl)
- $a_acls[$id]['row'][] = $acl;
- write_config();
- unbound_reconfigure();
+ if ($pconfig['Submit'] == gettext("Save")) {
+ if(!$a_acls[$id])
+ $a_acls[$id]['aclid'] = $id;
+
+ if (isset($id) && $a_acls[$id]) {
+ $a_acls[$id]['aclid'] = $pconfig['aclid'];
+ $a_acls[$id]['aclname'] = $pconfig['aclname'];
+ $a_acls[$id]['aclaction'] = $pconfig['aclaction'];
+ $a_acls[$id]['description'] = $pconfig['description'];
+ $a_acls[$id]['row'] = array();
+ foreach ($networkacl as $acl)
+ $a_acls[$id]['row'][] = $acl;
+ write_config();
+ mark_subsystem_dirty("unbound");
+ //unbound_reconfigure();
+ }
+ pfSenseHeader("/unbound_acls.php");
+ exit;
+ }
+
+ if ($pconfig['apply']) {
+ clear_subsystem_dirty("unbound");
+ $retval = 0;
+ $retval = unbound_reconfigure();
+ $savemsg = get_std_save_message($retval);
}
- header("Location: unbound_acls.php");
- exit;
}
}
@@ -148,6 +158,7 @@ include("head.inc");
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
+<form action="unbound_acls.php" method="post" name="iform" id="iform">
<?php
if (!$savemsg)
$savemsg = "";
@@ -157,6 +168,9 @@ if ($input_errors)
if ($savemsg)
print_info_box($savemsg);
+
+if (is_subsystem_dirty("unbound"))
+ print_info_box_np(gettext("The settings for Unbound DNS has changed. You must apply the configuration to take affect."));
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
@@ -178,7 +192,7 @@ if ($savemsg)
<?php if($act=="new" || $act=="edit"): ?>
- <form action="unbound_acls.php" method="post" name="iform" id="iform">
+
<input name="aclid" type="hidden" value="<?=$id;?>">
<input name="act" type="hidden" value="<?=$act;?>">
@@ -361,6 +375,4 @@ if ($savemsg)
</tr>
</table>
</body>
-<?php include("fend.inc"); ?>
-
-?> \ No newline at end of file
+<?php include("fend.inc"); ?> \ No newline at end of file
diff --git a/config/unbound/unbound_advanced.xml b/config/unbound/unbound_advanced.xml
index 239c39ee..30fca482 100644
--- a/config/unbound/unbound_advanced.xml
+++ b/config/unbound/unbound_advanced.xml
@@ -40,7 +40,7 @@
<requirements/>
<faq/>
<name>unbound_advanced</name>
- <version>1.4.8</version>
+ <version>1.4.14</version>
<title>Services: Unbound DNS Forwarder: Advanced Settings</title>
<include_file>/usr/local/pkg/unbound.inc</include_file>
<menu>