Commit 9f39b41b authored by Ad Schellevis's avatar Ad Schellevis

prevent ipfw modules for CP from getting loaded when not enabled

parent 227a53ba
...@@ -237,15 +237,14 @@ function captiveportal_get_last_activity($ip, $mac = NULL) { ...@@ -237,15 +237,14 @@ function captiveportal_get_last_activity($ip, $mac = NULL) {
/* reinit will disconnect all users, be careful! */ /* reinit will disconnect all users, be careful! */
function captiveportal_init_rules($reinit = false) { function captiveportal_init_rules($reinit = false) {
// load modules
captiveportal_load_modules();
//
// if ( $reinit ) {
$cpc = new OPNsense\CaptivePortal\CPClient(); $cpc = new OPNsense\CaptivePortal\CPClient();
if ($cpc->isEnabled()) {
// load modules ( only if CP is enabled )
captiveportal_load_modules();
}
$cpc->reconfigure(); $cpc->reconfigure();
unset($cpc); unset($cpc);
// }
} }
...@@ -395,8 +394,9 @@ function captiveportal_load_modules() { ...@@ -395,8 +394,9 @@ function captiveportal_load_modules() {
/* Always load dummynet now that even allowed ip and mac passthrough use it. */ /* Always load dummynet now that even allowed ip and mac passthrough use it. */
if (!is_module_loaded("dummynet.ko")) { if (!is_module_loaded("dummynet.ko")) {
mwexec("/sbin/kldload dummynet"); // TODO : enable dummynet when kernel issues are solved, dummynet currently disabled in the gui
set_sysctl(array("net.inet.ip.dummynet.io_fast" => "1", "net.inet.ip.dummynet.hash_size" => "256")); //mwexec("/sbin/kldload dummynet");
//set_sysctl(array("net.inet.ip.dummynet.io_fast" => "1", "net.inet.ip.dummynet.hash_size" => "256"));
} }
unmute_kernel_msgs(); unmute_kernel_msgs();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment