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 | |
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')
-rw-r--r-- | etc/inc/filter.inc | 3 | ||||
-rw-r--r-- | etc/inc/shaper.inc | 14 |
2 files changed, 11 insertions, 6 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 40b28e1..876c4e4 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -249,7 +249,8 @@ function filter_configure_sync() { update_filter_reload_status("Setting up SCRUB information"); $rules .= filter_generate_scrubing(); $rules .= "\n"; - $rules .= "{$dummynet_rules}\n"; + /* NOTE: Disabled until we catch up with dummynet changes. */ + //$rules .= "{$dummynet_rules}\n"; $rules .= "{$altq_queues}\n"; $rules .= "{$natrules}\n"; $rules .= "{$pfrules}\n"; 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) { |