diff options
author | Ermal <eri@pfsense.org> | 2014-02-20 19:32:49 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2014-02-20 19:32:49 +0000 |
commit | 7519cc29aedd0f957b4b124b2b1cf49e16938e2b (patch) | |
tree | 4e1ffd070a14f6166d994cf2897c118ad1d0c156 /etc | |
parent | 2e080989c4f52ebadd59e40fb05227d3a729af2b (diff) | |
download | pfsense-7519cc29aedd0f957b4b124b2b1cf49e16938e2b.zip pfsense-7519cc29aedd0f957b4b124b2b1cf49e16938e2b.tar.gz |
If set use the default bandwidth setting on the CP even for mac passthrough. Reported-by: https://forum.pfsense.org/index.php/topic,72761.0.html
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/captiveportal.inc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index daf7b18..7b1c4a2 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -946,8 +946,16 @@ function captiveportal_radius_stop_all() { function captiveportal_passthrumac_configure_entry($macent) { global $config, $g, $cpzone; - $bwUp = empty($macent['bw_up']) ? 0 : $macent['bw_up']; - $bwDown = empty($macent['bw_down']) ? 0 : $macent['bw_down']; + $bwUp = 0; + if (!empty($macent['bw_up'])) + $bwUp = $macent['bw_up']; + else if (isset($config['captiveportal'][$cpzone]['bwdefaultup'])) + $bwUp = $config['captiveportal'][$cpzone]['bwdefaultup']; + $bwDown = 0; + if (!empty($macent['bw_down'])) + $bwDown = $macent['bw_down']; + else if (isset($config['captiveportal'][$cpzone]['bwdefaultdn'])) + $bwDown = $config['captiveportal'][$cpzone]['bwdefaultdn']; $ruleno = captiveportal_get_next_ipfw_ruleno(); |