diff options
author | Ermal <eri@pfsense.org> | 2012-12-14 08:50:03 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-12-14 08:50:03 +0000 |
commit | 0d20a0409939738984e42256c7983bcc8f46d445 (patch) | |
tree | e6dc7d0b044212e0c2f64cc9c817e720bd362a93 /usr | |
parent | 4a5feb839e9e8ab4b398a95cb278e2d9a9f27193 (diff) | |
download | pfsense-0d20a0409939738984e42256c7983bcc8f46d445.zip pfsense-0d20a0409939738984e42256c7983bcc8f46d445.tar.gz |
Correctly retrieve the mac address
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/captiveportal/index.php | 6 |
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 */ |