From ad361510f1b8ae5db756a5382e0882b6d847fd7f Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 28 Nov 2012 15:59:27 +0000 Subject: Only try to get mac if the its required --- usr/local/captiveportal/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr') 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"); -- cgit v1.1