mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Do not apply bw limits if the setting is not enabled in CP. Though still respect radius attributes for now with this setting. Resolves #4127
This commit is contained in:
parent
5a0983446c
commit
1eff6ee0a2
@ -1783,8 +1783,11 @@ function portal_mac_radius($clientmac,$clientip) {
|
||||
function captiveportal_reapply_attributes($cpentry, $attributes) {
|
||||
global $config, $cpzone, $g;
|
||||
|
||||
$dwfaultbw_up = isset($config['captiveportal'][$cpzone]['bwdefaultup']) ? $config['captiveportal'][$cpzone]['bwdefaultup'] : 0;
|
||||
$dwfaultbw_down = isset($config['captiveportal'][$cpzone]['bwdefaultdn']) ? $config['captiveportal'][$cpzone]['bwdefaultdn'] : 0;
|
||||
if (isset($config['captiveportal'][$cpzone]['peruserbw'])) {
|
||||
$dwfaultbw_up = isset($config['captiveportal'][$cpzone]['bwdefaultup']) ? $config['captiveportal'][$cpzone]['bwdefaultup'] : 0;
|
||||
$dwfaultbw_down = isset($config['captiveportal'][$cpzone]['bwdefaultdn']) ? $config['captiveportal'][$cpzone]['bwdefaultdn'] : 0;
|
||||
} else
|
||||
$dwfaultbw_up = $dwfaultbw_down = 0;
|
||||
$bw_up = isset($attributes['bw_up']) ? round(intval($attributes['bw_up'])/1000, 2) : $dwfaultbw_up;
|
||||
$bw_down = isset($attributes['bw_down']) ? round(intval($attributes['bw_down'])/1000, 2) : $dwfaultbw_down;
|
||||
$bw_up_pipeno = $cpentry[1];
|
||||
@ -1961,8 +1964,11 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut
|
||||
return;
|
||||
}
|
||||
|
||||
$dwfaultbw_up = isset($config['captiveportal'][$cpzone]['bwdefaultup']) ? $config['captiveportal'][$cpzone]['bwdefaultup'] : 0;
|
||||
$dwfaultbw_down = isset($config['captiveportal'][$cpzone]['bwdefaultdn']) ? $config['captiveportal'][$cpzone]['bwdefaultdn'] : 0;
|
||||
if (isset($config['captiveportal'][$cpzone]['peruserbw'])) {
|
||||
$dwfaultbw_up = isset($config['captiveportal'][$cpzone]['bwdefaultup']) ? $config['captiveportal'][$cpzone]['bwdefaultup'] : 0;
|
||||
$dwfaultbw_down = isset($config['captiveportal'][$cpzone]['bwdefaultdn']) ? $config['captiveportal'][$cpzone]['bwdefaultdn'] : 0;
|
||||
} else
|
||||
$dwfaultbw_up = $dwfaultbw_down = 0;
|
||||
$bw_up = isset($attributes['bw_up']) ? round(intval($attributes['bw_up'])/1000, 2) : $dwfaultbw_up;
|
||||
$bw_down = isset($attributes['bw_down']) ? round(intval($attributes['bw_down'])/1000, 2) : $dwfaultbw_down;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user