aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2011-09-29 22:50:09 +0200
committerWarren Baker <warren@decoy.co.za>2011-09-29 22:50:09 +0200
commitdf75910df06941921b7bbb2f0ccc71168d587f12 (patch)
tree3100adef418a1d793f0c6d0922495531290c3cf9
parent053744f58c69b71f6d2cce08b29173106a2e46ac (diff)
downloadpfsense-packages-df75910df06941921b7bbb2f0ccc71168d587f12.tar.gz
pfsense-packages-df75910df06941921b7bbb2f0ccc71168d587f12.tar.bz2
pfsense-packages-df75910df06941921b7bbb2f0ccc71168d587f12.zip
Handle snoop acl correctly
-rw-r--r--config/unbound/unbound.inc3
1 files changed, 2 insertions, 1 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.";