summaryrefslogtreecommitdiffstats
path: root/usr/local/captiveportal
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-12-14 08:50:03 +0000
committerErmal <eri@pfsense.org>2012-12-14 08:50:03 +0000
commit0d20a0409939738984e42256c7983bcc8f46d445 (patch)
treee6dc7d0b044212e0c2f64cc9c817e720bd362a93 /usr/local/captiveportal
parent4a5feb839e9e8ab4b398a95cb278e2d9a9f27193 (diff)
downloadpfsense-0d20a0409939738984e42256c7983bcc8f46d445.zip
pfsense-0d20a0409939738984e42256c7983bcc8f46d445.tar.gz
Correctly retrieve the mac address
Diffstat (limited to 'usr/local/captiveportal')
-rwxr-xr-xusr/local/captiveportal/index.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php
index 384f1dd..4204201 100755
--- a/usr/local/captiveportal/index.php
+++ b/usr/local/captiveportal/index.php
@@ -98,8 +98,8 @@ $passthrumac = isset($config['captiveportal'][$cpzone]['passthrumacadd']);
/* find MAC address for client */
if ($macfilter || $passthrumac) {
- $clientmac = pfSense_ip_to_mac($clientip);
- if (!$clientmac) {
+ $tmpres = pfSense_ip_to_mac($clientip);
+ if (!is_array($tmpres)) {
/* unable to find MAC address - shouldn't happen! - bail out */
captiveportal_logportalauth("unauthenticated","noclientmac",$clientip,"ERROR");
echo "An error occurred. Please check the system logs for more information.";
@@ -107,6 +107,8 @@ if ($macfilter || $passthrumac) {
ob_flush();
return;
}
+ $clientmac = $tmpres['macaddr'];
+ unset($tmpres);
}
/* find out if we need RADIUS + RADIUSMAC or not */
OpenPOWER on IntegriCloud