From 68d0b70a5a4436d6de8016ade7aa7dc456db7b25 Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 20 Apr 2010 18:44:33 +0000 Subject: Make pasthrough GUI code catch-up with the latest changes. --- usr/local/www/services_captiveportal_mac.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'usr/local/www/services_captiveportal_mac.php') diff --git a/usr/local/www/services_captiveportal_mac.php b/usr/local/www/services_captiveportal_mac.php index b689a81..c653c0a 100755 --- a/usr/local/www/services_captiveportal_mac.php +++ b/usr/local/www/services_captiveportal_mac.php @@ -59,9 +59,6 @@ if ($_POST) { $retval = 0; $rules = captiveportal_passthrumac_configure(); - //file_put_contents("{$g['tmp_path']}/passthru.mac", $rules); - //mwexec("/sbin/ipfw {$g['tmp_path']}/passthru.mac"); - $savemsg = get_std_save_message($retval); if ($retval == 0) clear_subsystem_dirty('passthrumac'); @@ -70,12 +67,9 @@ if ($_POST) { if ($_GET['act'] == "del") { if ($a_passthrumacs[$_GET['id']]) { - $ruleno = captiveportal_get_ipfw_ruleno_byvalue($a_passthrumacs[$_GET['id']]['mac']); - if ($ruleno) { - mwexec("/sbin/ipfw delete {$ruleno}"); - captiveportal_free_ipfw_ruleno($ruleno); - $ruleno++; - mwexec("/sbin/ipfw delete {$ruleno}"); + $ip = captiveportal_get_ipfw_ruleno_byvalue($a_passthrumacs[$_GET['id']]['mac']); + if ($ip) { + captiveportal_disconnect_client($ip); } unset($a_passthrumacs[$_GET['id']]); write_config(); -- cgit v1.1