summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-07-22 18:59:02 +0000
committerErmal <eri@pfsense.org>2010-07-22 18:59:02 +0000
commit1941345ced8d32eceb93609047552aa970f73cf2 (patch)
tree35398f77dc3fb47f815c2575bfad615e22efd272 /etc
parent98c02cac641448d9f54084641ba9756ec96625c6 (diff)
downloadpfsense-1941345ced8d32eceb93609047552aa970f73cf2.zip
pfsense-1941345ced8d32eceb93609047552aa970f73cf2.tar.gz
If no bandwidth specified for root queue honor this decision and generate proper rules.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/shaper.inc15
1 files changed, 7 insertions, 8 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index f49f34b..21d69c7 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -333,11 +333,9 @@ class altq_root_queue {
function ReadConfig(&$conf) {
if (isset($conf['tbrconfig']))
$this->SetTbrConfig($conf['tbrconfig']);
- if ($conf['bandwidth'] <> "") {
- $this->SetBandwidth($conf['bandwidth']);
- if ($conf['bandwidthtype'] <> "")
- $this->SetBwscale($conf['bandwidthtype']);
- }
+ $this->SetBandwidth($conf['bandwidth']);
+ if ($conf['bandwidthtype'] <> "")
+ $this->SetBwscale($conf['bandwidthtype']);
if (isset($conf['scheduler'])) {
if ($this->GetScheduler() != $conf['scheduler']) {
foreach ($this->queues as $q) {
@@ -517,10 +515,11 @@ class altq_root_queue {
$rules = " altq on " . get_real_interface($this->GetInterface());
if ($this->GetScheduler())
$rules .= " ".strtolower($this->GetScheduler());
- if ($this->GetBandwidth())
+ if ($this->GetBandwidth()) {
$rules .= " bandwidth ".trim($this->GetBandwidth());
- if ($this->GetBwscale())
- $rules .= $this->GetBwscale();
+ if ($this->GetBwscale())
+ $rules .= $this->GetBwscale();
+ }
if ($this->GetTbrConfig())
$rules .= " tbrsize ".$this->GetTbrConfig();
if (count($this->queues)) {
OpenPOWER on IntegriCloud