diff options
author | Ermal <eri@pfsense.org> | 2012-11-28 15:59:27 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-11-28 15:59:27 +0000 |
commit | ad361510f1b8ae5db756a5382e0882b6d847fd7f (patch) | |
tree | 92f322d5b95abcba1b75a0092347b04d6dd783a6 /usr/local/captiveportal/index.php | |
parent | 84464c9ab0b94b9602c6ec62502dc4ad3e7a8c0a (diff) | |
download | pfsense-ad361510f1b8ae5db756a5382e0882b6d847fd7f.zip pfsense-ad361510f1b8ae5db756a5382e0882b6d847fd7f.tar.gz |
Only try to get mac if the its required
Diffstat (limited to 'usr/local/captiveportal/index.php')
-rwxr-xr-x | usr/local/captiveportal/index.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index 8ba392d..c0936b7 100755 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -95,7 +95,8 @@ $macfilter = !isset($config['captiveportal'][$cpzone]['nomacfilter']); $passthrumac = isset($config['captiveportal'][$cpzone]['passthrumacadd']); /* find MAC address for client */ -$clientmac = arp_get_mac_by_ip($clientip); +if ($macfilter || $passthrumac) + $clientmac = arp_get_mac_by_ip($clientip); if (!$clientmac && ($macfilter || $passthrumac)) { /* unable to find MAC address - shouldn't happen! - bail out */ captiveportal_logportalauth("unauthenticated","noclientmac",$clientip,"ERROR"); |