From df75910df06941921b7bbb2f0ccc71168d587f12 Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Thu, 29 Sep 2011 22:50:09 +0200 Subject: Handle snoop acl correctly --- config/unbound/unbound.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config/unbound') 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."; -- cgit v1.2.3