Bug #1653
closedCP timeout bug: get_last_activity
0%
Description
Running 2.0-RC3 Jul 4 17:29 Nanobsd.
Captive portal is expiring entries every cycle (60 seconds by default). So I get the login page, I click continue, which creates the captiveportal.db entry, and then I can make connections until the next time the database is pruned.
I have the timeouts set to 30 minute soft(idletimeout) and 120 minute hard(timeout).
One thing that I have noticed is that the command to find out the last activity (captiveportal_get_last_activity in captiveportal.inc) "/sbin/ipfw table 1 entrystats {$ip} 2>/dev/null" is not returning a timestamp as the last entry anymore.
When I run it on an older snapshot I get something like:
192.168.1.164/32 20014 5071 658430 1309977260
When I run it on the newest version, I get: (no timestamp)
192.168.1.130/32 0 893 0 119298
I haven't been able to find documentation on what entrystats is supposed to be returning, but field 4 looks like it should be a timestamp.
I also noticed a comment typo on line 803 of captiveportal.inc.
/* Delete client's ip entry from tables 3 and 4. */
mwexec("/sbin/ipfw table 1 delete {$dbent2}");
mwexec("/sbin/ipfw table 2 delete {$dbent2}");
Thanks
Josh