diff options
author | Ermal LUÇI <eri@pfsense.org> | 2015-01-12 12:26:00 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2015-01-12 12:26:00 +0100 |
commit | 124299a347ecaf0e892214ec2ee0c82ce7d337e0 (patch) | |
tree | e7978b2d5d1d6cd04c88f118ac9b3e3554ab6328 | |
parent | 0fc3c465cde62aa72c92da1add5b7c38281764db (diff) | |
download | pfsense-124299a347ecaf0e892214ec2ee0c82ce7d337e0.zip pfsense-124299a347ecaf0e892214ec2ee0c82ce7d337e0.tar.gz |
Revert "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."
This reverts commit 7077addc5a5058fab4b4dc7678270c1000d342c9.
-rw-r--r-- | etc/inc/captiveportal.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index e24982e..c83daf1 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -1039,9 +1039,13 @@ function captiveportal_passthrumac_configure($lock = false) { $rules = ""; if (is_array($config['captiveportal'][$cpzone]['passthrumac'])) { - $tmprules = array_map('captiveportal_passthrumac_configure_entry', $config['captiveportal'][$cpzone]['passthrumac']); - $rules = implode("\n", $tmprules); - unset($tmprules); + $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); + } } return $rules; |