diff options
author | Ermal <eri@pfsense.org> | 2010-04-02 01:23:16 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-04-02 01:24:03 +0000 |
commit | d41e63b6ee2d7b0dbef64f3facc75d417573e622 (patch) | |
tree | 706aab7ee774e466a7562b2d6ed4282ed56556aa /etc/inc/shaper.inc | |
parent | 703539b6ae72c63cca9841e923f6af5f9276ca68 (diff) | |
download | pfsense-d41e63b6ee2d7b0dbef64f3facc75d417573e622.zip pfsense-d41e63b6ee2d7b0dbef64f3facc75d417573e622.tar.gz |
Use ipfw to create the pipes/queues for pf dummynet rules, until we can catch up with dummynet v3.
Diffstat (limited to 'etc/inc/shaper.inc')
-rw-r--r-- | etc/inc/shaper.inc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc index ff6df14..0b3da69 100644 --- a/etc/inc/shaper.inc +++ b/etc/inc/shaper.inc @@ -2865,9 +2865,9 @@ class dnpipe_class extends dummynet_class { if ($this->GetEnabled() == "") return; - $pfq_rule = "\ndnpipe ". $this->GetNumber(); + $pfq_rule = "\npipe ". $this->GetNumber(); if ($this->GetBandwidth() && $this->GetBwscale()) - $pfq_rule .= " bandwidth ".trim($this->GetBandwidth()).$this->GetBwscale(); + $pfq_rule .= " bw ".trim($this->GetBandwidth()).$this->GetBwscale(); if ($this->GetQlimit()) $pfq_rule .= " queue " . $this->GetQlimit(); if ($this->GetPlr()) @@ -3114,7 +3114,7 @@ class dnqueue_class extends dummynet_class { return; $parent =& $this->GetParent(); - $pfq_rule = "dnqueue ". $this->GetNumber() . " dnpipe " . $parent->GetNumber(); + $pfq_rule = "queue ". $this->GetNumber() . " dnpipe " . $parent->GetNumber(); if ($this->GetQlimit()) $pfq_rule .= " queue " . $this->GetQimit(); if ($this->GetWeight()) @@ -3886,7 +3886,7 @@ function filter_generate_altq_queues() { } function filter_generate_dummynet_rules() { - global $dummynet_pipe_list; + global $g, $dummynet_pipe_list; read_dummynet_config(); @@ -3901,7 +3901,11 @@ function filter_generate_dummynet_rules() { foreach ($dummynet_pipe_list as $dn) $dn_rules .= $dn->build_rules(); - return $dn_rules; + if (!empty($dnrules)) { + file_put_contents("{$g['tmp_path']}/rules.limiter", $dn_rules); + mwexec("/sbin/ipfw {$g['tmp_path']}/rules.limiter"); + } + //return $dn_rules; } function build_iface_without_this_queue($iface, $qname) { |