summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-12-19 22:16:47 +0000
committerErmal <eri@pfsense.org>2012-12-19 22:16:47 +0000
commitfe7e987e36951d4a96640ba2790c21911e21b957 (patch)
treeff878d3b02956ccc304e0a659956126e0eca2296 /etc
parentfe3693cb1ac33580f86b8ed103ca9c4088e57941 (diff)
downloadpfsense-fe7e987e36951d4a96640ba2790c21911e21b957.zip
pfsense-fe7e987e36951d4a96640ba2790c21911e21b957.tar.gz
Various fixes to removal of pipes
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/captiveportal.inc12
1 files changed, 4 insertions, 8 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 7f54121..25cea38 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -1371,15 +1371,11 @@ function captiveportal_free_dn_ruleno($ruleno) {
}
function captiveportal_get_dn_passthru_ruleno($value) {
- global $config, $g, $cpzone;
-
- $cpcfg = $config['captiveportal'][$cpzone];
- if(!isset($cpcfg['enable']))
- return NULL;
+ global $config, $g;
- $cpruleslck = lock("captiveportalrules{$cpzone}", LOCK_EX);
- if (file_exists("{$g['vardb_path']}/captiveportal_{$cpzone}.rules")) {
- $rules = unserialize(file_get_contents("{$g['vardb_path']}/captiveportal_{$cpzone}.rules"));
+ $cpruleslck = lock("captiveportalrulesdn", LOCK_EX);
+ if (file_exists("{$g['vardb_path']}/captiveportaldn.rules")) {
+ $rules = unserialize(file_get_contents("{$g['vardb_path']}/captiveportaldn.rules"));
captiveportal_ipfw_set_context($cpzone);
$ruleno = intval(`/sbin/ipfw show | /usr/bin/grep {$value} | /usr/bin/grep -v grep | /usr/bin/cut -d " " -f 5 | /usr/bin/head -n 1`);
if ($rules[$ruleno]) {
OpenPOWER on IntegriCloud