diff options
author | Ermal <eri@pfsense.org> | 2010-05-24 23:01:11 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-05-24 23:01:11 +0000 |
commit | f49c1b00d3c78270c722ea5cdf64109969581764 (patch) | |
tree | 8604527272bd28365dc3015c8195907ce6faac04 /usr/local/www/services_captiveportal_mac_edit.php | |
parent | d5c56d72260c089d4044c963eb471cd84359efa2 (diff) | |
download | pfsense-f49c1b00d3c78270c722ea5cdf64109969581764.zip pfsense-f49c1b00d3c78270c722ea5cdf64109969581764.tar.gz |
Actually use the previous configured mac/ip, if present, for finding rules to be deleted.
Diffstat (limited to 'usr/local/www/services_captiveportal_mac_edit.php')
-rwxr-xr-x | usr/local/www/services_captiveportal_mac_edit.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr/local/www/services_captiveportal_mac_edit.php b/usr/local/www/services_captiveportal_mac_edit.php index 0d46ec4..bc397b7 100755 --- a/usr/local/www/services_captiveportal_mac_edit.php +++ b/usr/local/www/services_captiveportal_mac_edit.php @@ -112,15 +112,18 @@ if ($_POST) { $mac['descr'] = $_POST['descr']; - if (isset($id) && $a_passthrumacs[$id]) + if (isset($id) && $a_passthrumacs[$id]) { + $oldmac = $a_passthrumacs[$id]['mac']; $a_passthrumacs[$id] = $mac; - else + } else { + $oldmac = $mac['mac']; $a_passthrumacs[] = $mac; + } passthrumacs_sort(); write_config(); - $ruleno = captiveportal_get_ipfw_passthru_ruleno($mac['mac']); + $ruleno = captiveportal_get_ipfw_passthru_ruleno($oldmac); if ($ruleno) { captiveportal_free_ipfw_ruleno($ruleno); $rules = "delete {$ruleno}\n"; |