mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Allow a passthrough mac to be deleted by a POST. Take the neccessary actions to disconnect and remove the mac from CP.
This commit is contained in:
parent
921406213f
commit
9426cb034a
@ -63,6 +63,28 @@ if ($_POST) {
|
||||
if ($retval == 0)
|
||||
clear_subsystem_dirty('passthrumac');
|
||||
}
|
||||
|
||||
if ($_POST['delmac'] && $_POST['postafterlogin']) {
|
||||
if (is_array($a_passthrumacs)) {
|
||||
$found = false;
|
||||
foreach ($a_passthrumacs as $idx => $macent) {
|
||||
if ($macent['mac'] == $_POST['delmac']) {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($found == true) {
|
||||
$ip = captiveportal_get_ipfw_ruleno_byvalue($_POST['delmac']);
|
||||
if ($ip) {
|
||||
captiveportal_disconnect_client($ip);
|
||||
}
|
||||
unset($a_passthrumacs[$idx]);
|
||||
write_config();
|
||||
captiveportal_passthrumac_configure(true);
|
||||
}
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if ($_GET['act'] == "del") {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user