summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-05-07 19:02:09 +0000
committerErmal Luçi <eri@pfsense.org>2009-05-07 19:02:09 +0000
commit2b5b6eb46b6c710a30ddcd17623bf7d8310ff56a (patch)
tree2cf481c4997c92a9d301b05785beb09821b2b009 /etc
parente4f020eeaa7571ce790c0f0224b98490b6403240 (diff)
downloadpfsense-2b5b6eb46b6c710a30ddcd17623bf7d8310ff56a.zip
pfsense-2b5b6eb46b6c710a30ddcd17623bf7d8310ff56a.tar.gz
Remove from filter load the captive portal module loading and move it to the captive portal functions where is its only place. Keep only the pass rule for the CP webserver will see later on if it can be removed at all.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/captiveportal.inc9
-rw-r--r--etc/inc/filter.inc12
2 files changed, 7 insertions, 14 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 3b7fc2b..751239c 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -60,12 +60,15 @@ function captiveportal_configure() {
/* kill any running minicron */
killbypid("{$g['varrun_path']}/minicron.pid");
+ /* make sure ipfw is loaded */
+ if (!is_module_loaded("ipfw.ko"))
+ filter_load_ipfw();
+ if (isset($config['captiveportal']['peruserbw']) && !is_module_loaded("dummynet.ko"))
+ mwexec("/sbin/kldload dummynet");
+
/* generate ipfw rules */
$cprules = captiveportal_rules_generate();
- /* make sure ipfw is loaded */
- filter_load_ipfw();
-
/* stop accounting on all clients */
captiveportal_radius_stop_all();
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 4fa9176..7aacf02 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -1563,8 +1563,6 @@ function filter_rules_generate()
$cp_interface = $config['captiveportal']['interface'];
$cp_interface_real = $FilterIflist[$cp_interface]['if'];
$cp_interface_ip = $FilterIflist[$cp_interface_real]['ip'];
- if (isset($config['captiveportal']['peruserbw']) && !is_module_loaded("dummynet.ko"))
- mwexec("/sbin/kldload dummynet");
if(is_ipaddr($cp_interface_ip) and $cp_interface_real)
$ipfrules .= "pass in quick on {$cp_interface_real} proto tcp from any to {$cp_interface_ip} port { 8000 8001 } keep state\n";
}
@@ -1851,15 +1849,7 @@ EOD;
}
}
$rule_arr = array_merge($rule_arr1,$rule_arr2);
- /*
- * check to see if CP is enabled
- * and if so load ipfw for later usage.
- */
- if (isset($config['captiveportal']['enable']) && isset($config['interfaces'][$config['captiveportal']['interface']]['enable'])) {
- filter_load_ipfw();
- mwexec("/sbin/ipfw delete set 3");
- mwexec("/sbin/ipfw delete set 2");
- }
+
$ipfrules .= "\n# User-defined aliases follow\n";
/* tables for aliases */
foreach($table_cache as $table)
OpenPOWER on IntegriCloud