summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_mac.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-05-03 18:14:27 +0000
committerErmal <eri@pfsense.org>2010-05-03 18:14:27 +0000
commitd5ae560d8396f81a6f73667bf53df046b71ace35 (patch)
treec6cfd26b90561531d05d36fa320b809a94de14e6 /usr/local/www/services_captiveportal_mac.php
parentb01792a0a3df6795d21ca205cf57b371b41bf195 (diff)
downloadpfsense-d5ae560d8396f81a6f73667bf53df046b71ace35.zip
pfsense-d5ae560d8396f81a6f73667bf53df046b71ace35.tar.gz
Ticket #565. Correct deleting passthru mac entries. revert back to always allow a passthru mac as with allowed ips. Remove the check during login for passthru mac entries they will never make it to the login page.
Diffstat (limited to 'usr/local/www/services_captiveportal_mac.php')
-rwxr-xr-xusr/local/www/services_captiveportal_mac.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/usr/local/www/services_captiveportal_mac.php b/usr/local/www/services_captiveportal_mac.php
index dd5fdfe..7c40b85 100755
--- a/usr/local/www/services_captiveportal_mac.php
+++ b/usr/local/www/services_captiveportal_mac.php
@@ -74,13 +74,12 @@ if ($_POST) {
}
}
if ($found == true) {
- $ip = captiveportal_get_ipfw_ruleno_byvalue($_POST['delmac']);
- if ($ip) {
- captiveportal_disconnect_client($ip);
+ $ruleno = captiveportal_get_ipfw_passthru_ruleno($_POST['delmac']);
+ if ($ruleno) {
+ mwexec("/sbin/ipfw delete {$ruleno}; /sbin/ipfw delete " . ++$ruleno);
}
unset($a_passthrumacs[$idx]);
write_config();
- captiveportal_passthrumac_configure(true);
}
}
exit;
@@ -89,14 +88,13 @@ if ($_POST) {
if ($_GET['act'] == "del") {
if ($a_passthrumacs[$_GET['id']]) {
- $ip = captiveportal_get_ipfw_ruleno_byvalue($a_passthrumacs[$_GET['id']]['mac']);
- if ($ip) {
- captiveportal_disconnect_client($ip);
+ $ruleno = captiveportal_get_ipfw_passthru_ruleno($a_passthrumacs[$_GET['id']]['mac']);
+ if ($ruleno) {
+ mwexec("/sbin/ipfw delete {$ruleno}; /sbin/ipfw delete " . ++$ruleno);
}
unset($a_passthrumacs[$_GET['id']]);
write_config();
header("Location: services_captiveportal_mac.php");
- mark_subsystem_dirty('passthrumac');
exit;
}
}
OpenPOWER on IntegriCloud