From: Michael Tremer Date: Thu, 5 Oct 2017 10:04:29 +0000 (+0200) Subject: captive portal: Don't remove unlimited access after one hour X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b1773d1a37700ce2b07290750052d91983a65620;p=people%2Fms%2Fipfire-2.x.git captive portal: Don't remove unlimited access after one hour Reported-by: Daniel Weismüller Signed-off-by: Michael Tremer --- diff --git a/src/scripts/captive-cleanup b/src/scripts/captive-cleanup index c39e4883a1..cf73760d0d 100755 --- a/src/scripts/captive-cleanup +++ b/src/scripts/captive-cleanup @@ -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};