diff options
author | Ermal LUÇI <eri@pfsense.org> | 2015-05-01 21:00:28 +0200 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2015-05-01 21:00:28 +0200 |
commit | 2842c8d407e34a9183908a1677ec162a7b0ea209 (patch) | |
tree | 3eb76a8133702eb39916f165e5fbd0ebc7b558d9 /etc | |
parent | d55e91c1e0eb5a54af7e163c05e11a362a05cb02 (diff) | |
download | pfsense-2842c8d407e34a9183908a1677ec162a7b0ea209.zip pfsense-2842c8d407e34a9183908a1677ec162a7b0ea209.tar.gz |
Fixes #4652 put workaround for bogus timestamp until real data are cosnumed.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/captiveportal.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index cbc197e..963e84c 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -1222,7 +1222,12 @@ function captiveportal_get_last_activity($ip, $mac = NULL, $table = 1) { $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']; + /* Workaround for #46652 */ + if ($ipfwoutput['packets'] > 0) { + return $ipfw_tbl1['timestamp']; + } else { + return $ipfwoutput['timestamp']; + } } return 0; |