diff options
author | Ermal <eri@pfsense.org> | 2010-04-20 21:31:34 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-04-20 21:31:34 +0000 |
commit | 0852838c4153b0a20e26b5c48ad817d2c0010afd (patch) | |
tree | 70d7f2643234ea09a8b3bddb5da256206d244d52 /usr/local/captiveportal | |
parent | 9426cb034ac912f495d456a4eeede31bd5efacaa (diff) | |
download | pfsense-0852838c4153b0a20e26b5c48ad817d2c0010afd.zip pfsense-0852838c4153b0a20e26b5c48ad817d2c0010afd.tar.gz |
Warn the user when we cannot get the MAC address on pass through auto add case. Also when a user does a logout through clicking the logout form exit after showing sending info on logout successful.
Diffstat (limited to 'usr/local/captiveportal')
-rwxr-xr-x | usr/local/captiveportal/index.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index 17e3c2f..f02814e 100755 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -81,10 +81,11 @@ if ($_POST['redirurl']) $redirurl = $_POST['redirurl']; $macfilter = !isset($config['captiveportal']['nomacfilter']); +$passthrumac = isset($config['captiveportal']['passthrumacadd']); /* find MAC address for client */ $clientmac = arp_get_mac_by_ip($clientip); -if (!$clientmac && $macfilter) { +if (!$clientmac && ($macfilter || $passthrumac)) { /* 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."; @@ -117,6 +118,7 @@ setTimeout('window.close();',5000) ; </HTML> EOD; +exit; /* The $macfilter can be removed safely since we first check if the $clientmac is present, if not we fail */ } else if ($clientmac && portal_mac_fixed($clientmac)) { /* punch hole in ipfw for pass thru mac addresses */ |