summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2016-11-07 10:36:19 -0500
committerSteve Beaver <sbeaver@netgate.com>2016-11-07 10:36:19 -0500
commit7c3a9dede96552233fbe1da35ac4126aa524711b (patch)
tree1985dc90c4f16d7de3f588779be09b97ae673640 /src/usr
parent54a217f0ffbdf4c68dca0d2cb404bd2be8c645fd (diff)
downloadpfsense-7c3a9dede96552233fbe1da35ac4126aa524711b.zip
pfsense-7c3a9dede96552233fbe1da35ac4126aa524711b.tar.gz
Fixed #6779
Round calculated bandwidth down to nearest integer
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
index 5cfba52..4a83c42 100644
--- a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
+++ b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
@@ -876,14 +876,14 @@ function apply_all_chosen_items() {
$tmpcf['enabled'] = "on";
If ($sched == "CBQ") {
$tmpcf['borrow'] = "on";
- $tmpcf['bandwidth'] = $remainbw * 0.2;
+ $tmpcf['bandwidth'] = intval($remainbw * 0.2);
$tmpcf['bandwidthtype'] = "%";
}
else if ($sched == "HFSC") {
$lkbw = 0.20 * $remainbw;
- $tmpcf['linkshare3'] = "{$lkbw}%";
+ $tmpcf['linkshare3'] = intval($lkbw) . "%";
$tmpcf['linkshare'] = "on";
- $tmpcf['bandwidth'] = $lkbw;
+ $tmpcf['bandwidth'] = intval($lkbw);
$tmpcf['bandwidthtype'] = "%";
}
array_push($tmppath, "qACK");
OpenPOWER on IntegriCloud