summaryrefslogtreecommitdiffstats
path: root/usr/local/captiveportal
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-11-28 15:59:27 +0000
committerErmal <eri@pfsense.org>2012-11-28 15:59:27 +0000
commitad361510f1b8ae5db756a5382e0882b6d847fd7f (patch)
tree92f322d5b95abcba1b75a0092347b04d6dd783a6 /usr/local/captiveportal
parent84464c9ab0b94b9602c6ec62502dc4ad3e7a8c0a (diff)
downloadpfsense-ad361510f1b8ae5db756a5382e0882b6d847fd7f.zip
pfsense-ad361510f1b8ae5db756a5382e0882b6d847fd7f.tar.gz
Only try to get mac if the its required
Diffstat (limited to 'usr/local/captiveportal')
-rwxr-xr-xusr/local/captiveportal/index.php3
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");
OpenPOWER on IntegriCloud