summaryrefslogtreecommitdiffstats
path: root/etc/inc/shaper.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-02-14 06:24:51 +0000
committerErmal Luçi <eri@pfsense.org>2009-02-14 06:24:51 +0000
commitf476ef157174cfbd0cae07bf6059571d05349258 (patch)
tree75c6d526dac8310badc846e0248892618c970745 /etc/inc/shaper.inc
parent0af9dba4db8ea568b788211b613c2300d14a56ab (diff)
downloadpfsense-f476ef157174cfbd0cae07bf6059571d05349258.zip
pfsense-f476ef157174cfbd0cae07bf6059571d05349258.tar.gz
Start the userland layer7 daemon after the rules have loaded so the shaper queues can be resolved by the daemon.
Diffstat (limited to 'etc/inc/shaper.inc')
-rw-r--r--etc/inc/shaper.inc20
1 files changed, 18 insertions, 2 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index 2c8a8ca..7d5b5b7 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -3379,8 +3379,24 @@ function generate_layer7_files() {
$fp = fopen($path,'w');
fwrite($fp,$rules);
fclose($fp);
-
- // XXX: Hardcoded number of packets to garbage collect.
+ }
+ }
+}
+
+function layer7_start_l7daemon() {
+ global $layer7_rules_list;
+
+ /*
+ * XXX: Needed ?!
+ * read_layer7_config();
+ */
+
+ foreach($layer7_rules_list as $l7rules) {
+ if($l7rules->GetREnabled()) {
+ $filename = $l7rules->GetRName() . ".l7";
+ $path = "/tmp/" . $filename;
+
+ // XXX: Hardcoded number of packets to garbage collect.
$ipfw_classifyd_init = "/usr/local/sbin/ipfw-classifyd -n 5 -c {$path} -p " . $l7rules->GetRPort() . " -P /usr/local/share/protocols";
mwexec_bg($ipfw_classifyd_init);
}
OpenPOWER on IntegriCloud