diff options
author | Ermal <eri@pfsense.org> | 2011-04-21 21:39:03 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-04-21 21:39:03 +0000 |
commit | 2d4003aab1d969ed9ba3e52f2fe3ec083e4bef8c (patch) | |
tree | df726b1b378db3c2be3f33eac2ff055b4f0b7e09 /etc | |
parent | 908cbaf91a98b223386709ba64a75179a323e1d1 (diff) | |
download | pfsense-2d4003aab1d969ed9ba3e52f2fe3ec083e4bef8c.zip pfsense-2d4003aab1d969ed9ba3e52f2fe3ec083e4bef8c.tar.gz |
If the bandwidth value is coming from radius scale it up to the requested Kbit/s unit.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/captiveportal.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 196d83c..a66c6cb 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -1659,8 +1659,8 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut */ $peruserbw = isset($config['captiveportal']['peruserbw']); - $bw_up = isset($attributes['bw_up']) ? trim($attributes['bw_up']) : $config['captiveportal']['bwdefaultup']; - $bw_down = isset($attributes['bw_down']) ? trim($attributes['bw_down']) : $config['captiveportal']['bwdefaultdn']; + $bw_up = isset($attributes['bw_up']) ? round(intval($attributes['bw_up'])/1000, 2) : $config['captiveportal']['bwdefaultup']; + $bw_down = isset($attributes['bw_down']) ? round(intval($attributes['bw_down'])/1000, 2) : $config['captiveportal']['bwdefaultdn']; if ($passthrumac) { $mac = array(); |