summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc19
-rw-r--r--src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc16
2 files changed, 21 insertions, 14 deletions
diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc
index 796752b..b29d1d0 100644
--- a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc
+++ b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc
@@ -1089,8 +1089,8 @@ function apply_all_chosen_items() {
$altq->SetInterface($config['ezshaper']['step2']["local{$i}interface"]);
$altq->SetScheduler($config['ezshaper']['step2']["local{$i}downloadscheduler"]);
- //$altq->SetBandwidth($config['ezshaper']['step2']["conn{$i}download"]);
- //$altq->SetBwscale($config['ezshaper']['step2']["conn{$i}downloadspeed"]);
+ $altq->SetBandwidth($downbw / 1000);
+ $altq->SetBwscale("Kb");
$altq->SetEnabled("on");
$altq_list_queues[$altq->GetQname()] =& $altq;
array_push($tmppath, $config['ezshaper']['step2']["local{$i}interface"]);
@@ -1178,6 +1178,7 @@ function apply_all_chosen_items() {
$remainbw = 100 - $remainbw;
}
+ $downqbw = $downbw;
if (!$p2pcatchall) {
if ($sched == "PRIQ")
$q =& new priq_queue();
@@ -1206,6 +1207,8 @@ function apply_all_chosen_items() {
//echo "qDefault <br />";
//var_dump($input_errors);
$qtmp->wconfig();
+
+ $downqbw *= 0.8; /* $downqbw - 20% */
}
if ($sched != "PRIQ") {
@@ -1219,16 +1222,16 @@ function apply_all_chosen_items() {
$tmpcf['ecn'] = "on";
$tmpcf['enabled'] = "on";
If ($sched == "CBQ") {
- $tmpcf['bandwidth'] = floatval($config['ezshaper']['step2']["conn{$i}download"]);
- $tmpcf['bandwidthtype'] = $config['ezshaper']['step2']["conn{$i}downloadspeed"];
+ $tmpcf['bandwidth'] = $downqbw / 1000;
+ $tmpcf['bandwidthtype'] = "Kb";
}
else if ($sched == "HFSC") {
$tmpcf['upperlimit'] = "on";
- $tmpcf['upperlimit3'] = floatval($config['ezshaper']['step2']["conn{$i}download"]) . $config['ezshaper']['step2']["conn{$i}downloadspeed"];
+ $tmpcf['upperlimit3'] = $downqbw / 1000 . "Kb";
$tmpcf['linkshare'] = "on";
- $tmpcf['linkshare3'] = floatval($config['ezshaper']['step2']["conn{$i}download"]) . $config['ezshaper']['step2']["conn{$i}downloadspeed"];
- $tmpcf['bandwidth'] = floatval($config['ezshaper']['step2']["conn{$i}download"]);
- $tmpcf['bandwidthtype'] = $config['ezshaper']['step2']["conn{$i}downloadspeed"];
+ $tmpcf['linkshare3'] = $downqbw / 1000 . "Kb";
+ $tmpcf['bandwidth'] = $downqbw / 1000;
+ $tmpcf['bandwidthtype'] = "Kb";
}
array_push($tmppath, "qInternet");
$qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors);
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 3d155fc..d7f5e7a 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
@@ -885,6 +885,7 @@ function apply_all_chosen_items() {
$tmpcf['bandwidth'] = floatval($config['ezshaper']['step2']["conn{$i}upload"]);
$tmpcf['bandwidthtype'] = $config['ezshaper']['step2']["conn{$i}uploadspeed"];
}
+
array_push($tmppath, "qInternet");
$qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors);
//array_pop($tmppath);
@@ -1166,8 +1167,8 @@ function apply_all_chosen_items() {
$altq->SetInterface($config['ezshaper']['step2']["local{$i}interface"]);
$altq->SetScheduler($config['ezshaper']['step2']["local{$i}downloadscheduler"]);
- //$altq->SetBandwidth($lanbw/1000);
- //$altq->SetBwscale("Kb");
+ $altq->SetBandwidth($lanbw/1000);
+ $altq->SetBwscale("Kb");
$altq->SetEnabled("on");
$altq_list_queues[$altq->GetQname()] =& $altq;
array_push($tmppath, $config['ezshaper']['step2']["local{$i}interface"]);
@@ -1257,6 +1258,7 @@ function apply_all_chosen_items() {
$remainbw = 100 - $remainbw;
}
+ $lanqbw = $lanbw;
if (!$p2pcatchall) {
if ($sched == "PRIQ")
$q =& new priq_queue();
@@ -1285,6 +1287,8 @@ function apply_all_chosen_items() {
//echo "qDefault <br />";
//var_dump($input_errors);
$qtmp->wconfig();
+
+ $lanqbw *= 0.8; /* lanqbw - 20% */
}
if ($sched != "PRIQ") {
@@ -1298,15 +1302,15 @@ function apply_all_chosen_items() {
$tmpcf['ecn'] = "on";
$tmpcf['enabled'] = "on";
If ($sched == "CBQ") {
- $tmpcf['bandwidth'] = $lanbw/1000;
+ $tmpcf['bandwidth'] = $lanqbw/1000;
$tmpcf['bandwidthtype'] = "Kb";
}
else if ($sched == "HFSC") {
- $tmpcf['linkshare3'] = $lanbw/1000 . "Kb";
- $tmpcf['upperlimit3'] = $lanbw/1000 . "Kb";
+ $tmpcf['linkshare3'] = $lanqbw/1000 . "Kb";
+ $tmpcf['upperlimit3'] = $lanqbw/1000 . "Kb";
$tmpcf['upperlimit'] = "on";
$tmpcf['linkshare'] = "on";
- $tmpcf['bandwidth'] = $lanbw/1000;
+ $tmpcf['bandwidth'] = $lanqbw/1000;
$tmpcf['bandwidthtype'] = "Kb";
}
array_push($tmppath, "qInternet");
OpenPOWER on IntegriCloud