[ previous ] [ next ] [ threads ]
 From:  "=?ISO-8859-1?Q?R=F6nnblom_Jan=E5ke_?= /Teknous" <jan dash ake dot ronnblom at skeria dot skelleftea dot se>
 To:  m0n0wall at lists dot m0n0 dot ch
 Subject:  Re: [m0n0wall] problem with captiveportal (locking problem?) - sessions gone m
 Date:  Wed, 12 Dec 2007 10:45:34 +0100
YvesDM <ydmlog at gmail dot com> writes:
>I got a look-a-like issue too from time to time.
>Users are shown logged in on the CP status page with 0 bytes up/down.
>These sessions can reside for days, untill I clean them manually from
>m0n0wall webif.
>When it happens, that particular user is unable to login untill the session
>is manually cleaned.
>I 'll build a custom image with your patch and see what it brings me, tnx

You're welcome. However my patch causes users to be IMMEDIATELY
logged out if they haven't sent any trafic before the cleanup script
"captiveportal_prune_old()" is run. So perhaps there is a race which
possibly could loggoff a user without them getting a chance to send any data.

Perhaps the "real" fix should either set the $lastact to time() if its 0:

$lastact = $lastact ? $lastact : time();

This would loggoff the user when the timeout has expired and the user hasn't
sent any data.

Janåke Rönnblom
IT avdelningen, Teknous, Skellefteå Kommun
Assistentgatan 23
931 77 Skelleftea (Sweden)
Phone  : +46-910-58 54 24
Mobile : 070-397 07 43
Fax    : +46-910-58 54 99
URL    : http://skeria.skelleftea.se
"Those who do not understand Unix are condemned to reinvent it, poorly." --
Henry Spencer