summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2014-02-20 17:28:47 +0000
committerErmal <eri@pfsense.org>2014-02-20 17:28:47 +0000
commitea188e4587d00e4cce54f2036ed7dd1fa791d904 (patch)
treed03f38d23637967d032b3971a91ee4e170b0f1c5 /etc
parent070dad6c8d4f4e02ad9f6f87169b7adc1ebeee34 (diff)
downloadpfsense-ea188e4587d00e4cce54f2036ed7dd1fa791d904.zip
pfsense-ea188e4587d00e4cce54f2036ed7dd1fa791d904.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.inc13
1 files changed, 11 insertions, 2 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index bb13da5..1941ef8 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -933,9 +933,18 @@ function captiveportal_radius_stop_all() {
}
function captiveportal_passthrumac_configure_entry($macent) {
+ global $cpzone, $config;
- $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();
$pipeno = captiveportal_get_next_dn_ruleno();
OpenPOWER on IntegriCloud