summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_mac_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-05-24 23:01:11 +0000
committerErmal <eri@pfsense.org>2010-05-24 23:01:11 +0000
commitf49c1b00d3c78270c722ea5cdf64109969581764 (patch)
tree8604527272bd28365dc3015c8195907ce6faac04 /usr/local/www/services_captiveportal_mac_edit.php
parentd5c56d72260c089d4044c963eb471cd84359efa2 (diff)
downloadpfsense-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-xusr/local/www/services_captiveportal_mac_edit.php9
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";
OpenPOWER on IntegriCloud