Ticket #4007, properly pass the table number here to retrieve the status.

This commit is contained in:
Ermal LUÇI 2014-11-20 11:50:41 +01:00
parent 687ff78c96
commit bc9155c33b

View File

@ -1129,10 +1129,10 @@ function captiveportal_allowedip_configure() {
}
/* get last activity timestamp given client IP address */
function captiveportal_get_last_activity($ip, $mac = NULL) {
function captiveportal_get_last_activity($ip, $mac = NULL, $table = 1) {
global $cpzoneid;
$ipfwoutput = pfSense_ipfw_getTablestats($cpzoneid, IP_FW_TABLE_XLISTENTRY, $ip, $mac);
$ipfwoutput = pfSense_ipfw_getTablestats($cpzoneid, IP_FW_TABLE_XLISTENTRY, $table, $ip, $mac);
/* Reading only from one of the tables is enough of approximation. */
if (is_array($ipfwoutput)) {
return $ipfwoutput['timestamp'];