diff options
author | Warren Baker <warren@decoy.co.za> | 2012-04-05 13:08:50 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2012-04-05 13:08:50 +0200 |
commit | 43a987e467db5431e715bc7696eb529ab8f9fa23 (patch) | |
tree | 38255a20fd7bfa6ec0a161f7a2c8d65ab4bc5f63 /etc/inc/unbound.inc | |
parent | eac1d3f9879bbfbdc2f800fa8eebd2577988d5e2 (diff) | |
download | pfsense-43a987e467db5431e715bc7696eb529ab8f9fa23.zip pfsense-43a987e467db5431e715bc7696eb529ab8f9fa23.tar.gz |
Add ACL id functions
Diffstat (limited to 'etc/inc/unbound.inc')
-rw-r--r-- | etc/inc/unbound.inc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc index cedd4b4..602f3e4 100644 --- a/etc/inc/unbound.inc +++ b/etc/inc/unbound.inc @@ -500,4 +500,22 @@ function unbound_setup() { unbound_resync_config(); } +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 |