captive portal: Don't remove unlimited access after one hour

Reported-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2017-10-05 12:04:29 +02:00
parent 027614d2dc
commit b1773d1a37

View File

@@ -35,6 +35,9 @@ if (-f $settingsfile && -f $clients && ! -z $clients){
&General::readhasharray("$clients", \%clientshash);
$time = time();
foreach my $key (keys %clientshash) {
# Skip unlimited access lines
next if ($clientshash{$key}[3] == 0);
$expiretime=($clientshash{$key}[2])+$clientshash{$key}[3];
if ($expiretime < $time){
delete $clientshash{$key};