summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-05-01 21:01:11 +0200
committerErmal LUÇI <eri@pfsense.org>2015-05-01 21:01:11 +0200
commit120acbae8c2edd2e60685dd7ca16966cd988afc7 (patch)
treeca5aa63a5fe9fb5b504cf1cf5841d7cff964acb3 /etc
parentafd0c1f2c9c46eaa8e496e98bea8a8e0887d504f (diff)
downloadpfsense-120acbae8c2edd2e60685dd7ca16966cd988afc7.zip
pfsense-120acbae8c2edd2e60685dd7ca16966cd988afc7.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 98dbfc9..7d9a0a9 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -1162,7 +1162,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