diff options
Diffstat (limited to 'etc')
-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; |