aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/unbound/unbound.inc3
-rw-r--r--config/unbound/unbound_acls.php2
2 files changed, 3 insertions, 2 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index d44d01a0..afb3c0b7 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -311,6 +311,8 @@ function unbound_acls_config() {
foreach($unbound_acls as $unbound_acl){
$unboundcfg .= "#{$unbound_acl['aclname']}\n";
foreach($unbound_acl['row'] as $network) {
+ if ($unbound_acl['aclaction'] == "allow snoop")
+ $unbound_acl['aclaction'] = "allow_snoop";
$unboundcfg .= "access-control: {$network['acl_network']}/{$network['mask']} {$unbound_acl['aclaction']}\n";
}
}
@@ -623,7 +625,6 @@ 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.";
diff --git a/config/unbound/unbound_acls.php b/config/unbound/unbound_acls.php
index b60de2dd..40f21595 100644
--- a/config/unbound/unbound_acls.php
+++ b/config/unbound/unbound_acls.php
@@ -203,7 +203,7 @@ if ($savemsg)
<td width="22%" valign="top" class="vncellreq"><?=gettext("Action");?></td>
<td width="78%" class="vtable">
<select name="aclaction" class="formselect">
- <?php $types = explode(",", "Deny,Refuse,Allow,Allow Snoop"); foreach ($types as $type): ?>
+ <?php $types = explode(",", "Allow,Deny,Refuse,Allow Snoop"); foreach ($types as $type): ?>
<option value="<?=strtolower($type);?>" <?php if (strtolower($type) == strtolower($pconfig['aclaction'])) echo "selected"; ?>>
<?=htmlspecialchars($type);?>
</option>