]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/scripts/captive-cleanup
ipsec-interfaces: Uses local IP address from connection first, then default
[ipfire-2.x.git] / src / scripts / captive-cleanup
index c39e4883a1e985cebf2d71f8f138e5a6057d0194..b576df4fe59295373625f87483e542b415107871 100755 (executable)
@@ -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};
@@ -43,4 +46,7 @@ if (-f $settingsfile && -f $clients && ! -z $clients){
                }
        }
        &General::writehasharray("$clients", \%clientshash);
+
+       # Reload firewall rules
+       system("/usr/local/bin/captivectrl");
 }