summaryrefslogtreecommitdiffstats
path: root/usr/local/captiveportal
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/captiveportal')
-rwxr-xr-xusr/local/captiveportal/index.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php
index e859c63..b7c708c 100755
--- a/usr/local/captiveportal/index.php
+++ b/usr/local/captiveportal/index.php
@@ -105,6 +105,9 @@ if ($macfilter || $passthrumac) {
unset($tmpres);
}
+/* Get blocked macs */
+$blockedmacs = array_flip(captiveportal_read_blockedmacs_db());
+
/* find out if we need RADIUS + RADIUSMAC or not */
if (file_exists("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db")) {
$radius_enable = TRUE;
@@ -136,6 +139,13 @@ setTimeout('window.close();',5000) ;
EOD;
captiveportal_disconnect_client($_POST['logout_id']);
+} else if ($macfilter && $clientmac && isset($blockedmacs[$clientmac])) {
+ captiveportal_logportalauth($clientmac,$clientmac,$clientip,"Blocked MAC address");
+ if (!empty($cpcfg['blockedmacsurl']))
+ portal_reply_page($cpcfg['blockedmacsurl'], "redir");
+ else
+ portal_reply_page($redirurl, "error", "This MAC address has been blocked");
+
} else if ($clientmac && $radmac_enable && portal_mac_radius($clientmac,$clientip, $radiusctx)) {
/* radius functions handle everything so we exit here since we're done */
OpenPOWER on IntegriCloud