Fixes #2082. Correct checking of existing session to take into consideration when possible/needed the mac address

This commit is contained in:
Ermal 2012-02-07 20:19:27 +00:00
parent 5c0d5003b3
commit 843a6fe25a

View File

@ -1742,7 +1742,7 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut
if (empty($cpentry[10]))
$cpentry[10] = 'first';
/* on the same ip */
if($cpentry[2] == $clientip) {
if ($cpentry[2] == $clientip && (isset($config['captiveportal'][$cpzone]['nomacfilter']) || empty($cpentry[3]) || $cpentry[3] == $clientmac)) {
captiveportal_logportalauth($cpentry[4],$cpentry[3],$cpentry[2],"CONCURRENT LOGIN - REUSING OLD SESSION");
$sessionid = $sid;
break;