summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-05-01 21:00:28 +0200
committerErmal LUÇI <eri@pfsense.org>2015-05-01 21:00:28 +0200
commit2842c8d407e34a9183908a1677ec162a7b0ea209 (patch)
tree3eb76a8133702eb39916f165e5fbd0ebc7b558d9 /etc
parentd55e91c1e0eb5a54af7e163c05e11a362a05cb02 (diff)
downloadpfsense-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.inc7
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;
OpenPOWER on IntegriCloud