aboutsummaryrefslogtreecommitdiffstats
path: root/config/unbound
diff options
context:
space:
mode:
Diffstat (limited to 'config/unbound')
-rw-r--r--config/unbound/unbound.inc21
1 files changed, 21 insertions, 0 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index 6c6a814d..cec618c9 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -623,6 +623,7 @@ function unbound_validate($post, $type=null) {
/* Validate the access lists */
if($type == "acl") {
$acls = $post;
+ $acls['aclaction'] = preg_replace(" ", "_", $acls['aclaction']);
// Check to ensure values entered is an action that is in the list
if ($acls['aclaction'] != 'refuse' && $acls['aclaction'] != 'allow' && $acls['aclaction'] != 'allow_snoop' && $acls['aclaction'] != 'deny')
$input_errors[] = "{$acls['aclaction']} is not a valid ACL Action. Please select one of the four actions defined in the list.";
@@ -861,4 +862,24 @@ function unbound_add_domain_overrides($pvt=false) {
}
}
+function unbound_acl_id_used($id) {
+ global $config;
+
+ if (is_array($config['installedpackages']['unboundacls']['config']))
+ foreach ($config['installedpackages']['unboundacls']['config'] as & $acls)
+ if ($id == $acls['aclid'])
+ return true;
+
+ return false;
+}
+
+function unbound_get_next_id() {
+
+ $aclid = 0;
+ while(unbound_acl_id_used($aclid))
+ $aclid++;
+
+ return $aclid;
+}
+
?> \ No newline at end of file