aboutsummaryrefslogtreecommitdiffstats
path: root/config/imspector
diff options
context:
space:
mode:
authorCharlie <root@testfbsd8.localdomain>2009-07-08 14:45:06 +0000
committerCharlie <root@testfbsd8.localdomain>2009-07-08 14:45:29 +0000
commitcc47995dd0b4f7a44c36a94d6f4feabddc418e12 (patch)
treed54a022f4a72f025e16d50b6ab708b47e7fbecfe /config/imspector
parentdae4090094c2d03a8659d8a1c2e69763f06139bb (diff)
downloadpfsense-packages-cc47995dd0b4f7a44c36a94d6f4feabddc418e12.tar.gz
pfsense-packages-cc47995dd0b4f7a44c36a94d6f4feabddc418e12.tar.bz2
pfsense-packages-cc47995dd0b4f7a44c36a94d6f4feabddc418e12.zip
Add needed code to packages to confirm to 2.0 rules for adding firewall rules. NOTE: other packages might need intervention but for now this is the neccessary minimum to remove dependency on pkg-utils.inc on filter.inc
Diffstat (limited to 'config/imspector')
-rw-r--r--config/imspector/imspector.inc17
-rw-r--r--config/imspector/imspector.xml1
2 files changed, 18 insertions, 0 deletions
diff --git a/config/imspector/imspector.inc b/config/imspector/imspector.inc
index 09974363..ea4458ce 100644
--- a/config/imspector/imspector.inc
+++ b/config/imspector/imspector.inc
@@ -104,6 +104,23 @@
//exec('pkg_delete imspector-0.4');
}
+ function imspector_generate_rules($type) {
+
+ $rules = "";
+ switch ($type) {
+ case 'rdr':
+ $rules = "# IMSpector rdr anchor\n";
+ $rules .= "rdr-anchor \"imspector\"\n";
+ break;
+ case 'rule':
+ $rules = "# IMSpector \n";
+ $rules .= "anchor \"miniupnpd\"\n";
+ break;
+ }
+
+ return $rules;
+ }
+
function sync_package_imspector() {
global $config;
global $input_errors;
diff --git a/config/imspector/imspector.xml b/config/imspector/imspector.xml
index afdcdcf0..c7595b9a 100644
--- a/config/imspector/imspector.xml
+++ b/config/imspector/imspector.xml
@@ -218,4 +218,5 @@
<custom_php_deinstall_command>
deinstall_package_imspector();
</custom_php_deinstall_command>
+ <filter_rules_needed>imspector_generate_rules</filter_rules_needed>
</packagegui>