diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2016-03-28 14:11:41 -0500 |
---|---|---|
committer | Luiz Otavio O Souza <luiz@netgate.com> | 2016-03-28 17:13:34 -0500 |
commit | f6742d9a4402030d2b69602f0f48add96ea202a2 (patch) | |
tree | 8c17480c01fc7924d62a5f2bb172b8c65294052e /src | |
parent | 45eeb0385d5d0873b121a6aee8f7bd7f7ab5d467 (diff) | |
download | pfsense-f6742d9a4402030d2b69602f0f48add96ea202a2.zip pfsense-f6742d9a4402030d2b69602f0f48add96ea202a2.tar.gz |
Fixes the shaper wizards to split the bandwidth correctly.
With P2P catchall disabled, the qLink queue (using 20% of root bandwidth) was not taken into account.
Decrease 20% of qInternet bandwidth queue in this case.
Ticket #5721
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc | 19 | ||||
-rw-r--r-- | src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc | 16 |
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"); |