summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-01-12 12:30:45 +0100
committerErmal LUÇI <eri@pfsense.org>2015-01-12 12:31:03 +0100
commit2ea976b71c3660bb549042b1a81fa3204e1add19 (patch)
tree75ef12c75cfe2c31d7b95f90b56a0a249b8d03cf /usr/local
parent9b255a367d7e55174dca5a7b6cf2a1f8b17d5fbf (diff)
downloadpfsense-2ea976b71c3660bb549042b1a81fa3204e1add19.zip
pfsense-2ea976b71c3660bb549042b1a81fa3204e1add19.tar.gz
Properly handle large passthrough entries even here.
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/services_captiveportal_mac.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/usr/local/www/services_captiveportal_mac.php b/usr/local/www/services_captiveportal_mac.php
index f8de219..a73d2d1 100644
--- a/usr/local/www/services_captiveportal_mac.php
+++ b/usr/local/www/services_captiveportal_mac.php
@@ -71,14 +71,19 @@ if ($_POST) {
if ($_POST['apply']) {
$retval = 0;
- $cpzoneid = $a_cp[$cpzone]['cpzoneid'];
- $rules = captiveportal_passthrumac_configure();
- @file_put_contents("{$g['tmp_path']}/passthrumac_gui", $rules);
- mwexec("/sbin/ipfw -x {$cpzoneid} {$g['tmp_path']}/passthrumac_gui");
- $savemsg = get_std_save_message($retval);
- if ($retval == 0)
- clear_subsystem_dirty('passthrumac');
- @unlink("{$g['tmp_path']}/passthrumac_gui");
+ if (is_array($a_cp[$cpzone]['passthrumac'])) {
+ if (count($a_cp[$cpzone]['passthrumac']) > 2000)
+ set_time_limit(0);
+ $cpzoneid = $a_cp[$cpzone]['cpzoneid'];
+ $rules = captiveportal_passthrumac_configure();
+ @file_put_contents("{$g['tmp_path']}/passthrumac_gui", $rules);
+ mwexec("/sbin/ipfw -x {$cpzoneid} {$g['tmp_path']}/passthrumac_gui");
+ $savemsg = get_std_save_message($retval);
+ if ($retval == 0)
+ clear_subsystem_dirty('passthrumac');
+ @unlink("{$g['tmp_path']}/passthrumac_gui");
+ set_time_limit(900);
+ }
}
if ($_POST['postafterlogin']) {
OpenPOWER on IntegriCloud