From b44f72d1b120b2f23d3f01a60df1d95f6346da74 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 2 Feb 2011 16:20:42 -0500 Subject: Reinit rules after edit --- usr/local/www/services_captiveportal_hostname_edit.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'usr') diff --git a/usr/local/www/services_captiveportal_hostname_edit.php b/usr/local/www/services_captiveportal_hostname_edit.php index b6e580a..c5ed985 100755 --- a/usr/local/www/services_captiveportal_hostname_edit.php +++ b/usr/local/www/services_captiveportal_hostname_edit.php @@ -133,19 +133,8 @@ if ($_POST) { write_config(); - if (isset($config['captiveportal']['enable']) && is_module_loaded("ipfw.ko")) { - $rules = ""; - $hostname = gethostbyname($oldip); - if($hostname) - for ($i = 3; $i < 10; $i++) - $rules .= "table {$i} delete {$hostname}\n"; - $hostname = gethostbyname($ip); - if(is_ipaddr($hostname)) - $rules .= captiveportal_allowedip_configure_entry($hostname); - file_put_contents("{$g['tmp_path']}/allowedhostname_tmp{$id}", $rules); - mwexec("/sbin/ipfw -q {$g['tmp_path']}/allowedhostname_tmp{$id}"); - @unlink("{$g['tmp_path']}/allowedhostname_tmp{$id}"); - } + if (isset($config['captiveportal']['enable']) && is_module_loaded("ipfw.ko")) + captiveportal_init_rules(true); header("Location: services_captiveportal_hostname.php"); exit; -- cgit v1.1