summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-01-12 10:38:17 +0100
committerErmal LUÇI <eri@pfsense.org>2015-01-12 10:38:26 +0100
commitaa685f7a6d8a724ffe78bd2b4397714c7faff8b7 (patch)
tree0ccaa5b78bc900f97995c7bed302986c03044a8c /etc
parent7001542e3e454e66a36eaf300c4767a68cf3b4fb (diff)
downloadpfsense-aa685f7a6d8a724ffe78bd2b4397714c7faff8b7.zip
pfsense-aa685f7a6d8a724ffe78bd2b4397714c7faff8b7.tar.gz
Ticket #3932 Use array_map to get more parallelism when there are many entries. This makes it not reach the execution timeout with large entries.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/captiveportal.inc10
1 files changed, 3 insertions, 7 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 710788b..3964b40 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -1028,13 +1028,9 @@ function captiveportal_passthrumac_configure($lock = false) {
$rules = "";
if (is_array($config['captiveportal'][$cpzone]['passthrumac'])) {
- $nentries = count($config['captiveportal'][$cpzone]['passthrumac']);
- foreach ($config['captiveportal'][$cpzone]['passthrumac'] as $macent) {
- if ($nentries > 100)
- $rules .= captiveportal_passthrumac_configure_entry($macent, true);
- else
- $rules .= captiveportal_passthrumac_configure_entry($macent);
- }
+ $tmprules = array_map('captiveportal_passthrumac_configure_entry', $config['captiveportal'][$cpzone]['passthrumac']);
+ $rules = implode("\n", $tmprules);
+ unset($tmprules);
}
return $rules;
OpenPOWER on IntegriCloud