From 3a4b01476620d33b6d6200849231398f82e593c7 Mon Sep 17 00:00:00 2001 From: Ermal Date: Thu, 22 Nov 2012 16:43:47 +0000 Subject: Resolves #2529. Load the ipfw module before any commands are executed on CP. Also move the filter_load_ipfw() to captiveportal.inc:captiveportal_load_modules() since no other place uses ipfw(4) --- usr/local/www/services_captiveportal_zones_edit.php | 3 +-- usr/local/www/system_advanced_firewall.php | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/services_captiveportal_zones_edit.php b/usr/local/www/services_captiveportal_zones_edit.php index 3c2d759..4367744 100644 --- a/usr/local/www/services_captiveportal_zones_edit.php +++ b/usr/local/www/services_captiveportal_zones_edit.php @@ -79,8 +79,7 @@ if ($_POST) { write_config(); /* make sure ipfw is loaded */ - if (!is_module_loaded("ipfw.ko")) - filter_load_ipfw(); + captiveportal_load_modules(); mwexec("/usr/local/sbin/ipfw_context -a {$cpzone}", true); header("Location: services_captiveportal.php?zone={$cpzone}"); diff --git a/usr/local/www/system_advanced_firewall.php b/usr/local/www/system_advanced_firewall.php index 9fec26a..db0aaa4 100644 --- a/usr/local/www/system_advanced_firewall.php +++ b/usr/local/www/system_advanced_firewall.php @@ -173,13 +173,6 @@ if ($_POST) { write_config(); - /* - * XXX: This is a kludge here but its the better place than on every filter reload. - * NOTE: This is only for setting the ipfw state limits. - */ - if ($_POST['maximumstates'] && is_numeric($_POST['maximumstates']) && is_module_loaded("ipfw.ko")) - filter_load_ipfw(); - $retval = 0; $retval = filter_configure(); if(stristr($retval, "error") <> true) -- cgit v1.1