From 28f4a00a9ce3f67df8540d0573d4eda0816610f3 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Sat, 17 Jul 2010 17:56:11 -0400 Subject: correctly add new pass-through MAC entries --- usr/local/www/services_captiveportal_mac_edit.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'usr/local/www/services_captiveportal_mac_edit.php') diff --git a/usr/local/www/services_captiveportal_mac_edit.php b/usr/local/www/services_captiveportal_mac_edit.php index b55e750..d5dace5 100755 --- a/usr/local/www/services_captiveportal_mac_edit.php +++ b/usr/local/www/services_captiveportal_mac_edit.php @@ -131,11 +131,12 @@ if ($_POST) { captiveportal_free_ipfw_ruleno($ruleno); $rules = "delete {$ruleno}\n"; $rules .= "delete " . ++$ruleno . "\n"; - $rules .= captiveportal_passthrumac_configure_entry($mac); - file_put_contents("{$g['tmp_path']}/tmpmacedit{$id}", $rules); - mwexec("/sbin/ipfw -q {$g['tmp_path']}/tmpmacedit{$id}"); - @unlink("{$g['tmp_path']}/tmpmacedit{$id}"); } + + $rules .= captiveportal_passthrumac_configure_entry($mac); + file_put_contents("{$g['tmp_path']}/tmpmacedit{$id}", $rules); + mwexec("/sbin/ipfw -q {$g['tmp_path']}/tmpmacedit{$id}"); + @unlink("{$g['tmp_path']}/tmpmacedit{$id}"); header("Location: services_captiveportal_mac.php"); exit; -- cgit v1.1