From 8cb1c6e3a2f776800548e6e6359e9c8ee2ce7b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Fri, 18 Jul 2008 16:46:43 +0000 Subject: Do not create pipe/queue if it is disabled by the user. --- etc/inc/shaper.inc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'etc') diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc index 23730fe..f661bb3 100644 --- a/etc/inc/shaper.inc +++ b/etc/inc/shaper.inc @@ -2642,6 +2642,9 @@ class dnpipe_class extends dummynet_class { } function build_rules() { + if ($this->GetEnabled() == "") + return; + $pfq_rule = "\ndnpipe ". $this->GetNumber(); if ($this->GetBandwidth() && $this->GetBwscale()) $pfq_rule .= " bandwidth ".trim($this->GetBandwidth()).$this->GetBwscale(); @@ -2887,6 +2890,9 @@ class dnqueue_class extends dummynet_class { } function build_rules() { + if ($this->GetEnabled() == "") + return; + $parent =& $this->GetParent(); $pfq_rule = "dnqueue ". $this->GetNumber() . " dnpipe " . $parent->GetNumber(); if ($this->GetQlimit()) -- cgit v1.1