adding a stop packet

Michael Markstaller mm at elabnet.de
Tue Oct 25 20:58:13 CEST 2005


I'm running something like this from crontab:

UPDATE radacct SET AcctStopTime = FROM_UNIXTIME(unix_timestamp(AcctStartTime) + AcctSessionTime), AcctTerminateCause = 'NoStopRecv', AcctStopDelay = (unix_timestamp(now()) - (unix_timestamp(AcctStartTime) + AcctSessionTime)), AcctSessionTime = AcctSessionTime + 300 WHERE AcctStopTime = '' AND (unix_timestamp(now()) - (unix_timestamp(AcctStartTime) + AcctSessionTime)) > 3660 AND AcctSessiontime > 0 ;
UPDATE radacct SET AcctStopTime = AcctStartTime, AcctTerminateCause = 'NoStop-AliveRecv', AcctStopDelay = (unix_timestamp(now()) - (unix_timestamp(AcctStartTime))) WHERE AcctStopTime = '' AND AcctSessionTime = 0 AND (unix_timestamp(now()) - unix_timestamp(AcctStartTime)) > 86400 ;

/* Purge failed attempts */
DELETE FROM radacct WHERE AcctStopTime > 0 AND AcctSessionTime = 0 AND AcctStopTime <= DATE_SUB(CURDATE(),INTERVAL 7 DAY);
 
Michael

> -----Original Message-----
> From: freeradius-users-bounces at lists.freeradius.org 
> [mailto:freeradius-users-bounces at lists.freeradius.org] On 
> Behalf Of Chuck
> Sent: Tuesday, October 25, 2005 8:30 PM
> To: freeradius-users at lists.freeradius.org
> Subject: adding a stop packet
> 
> 
> We are using freeradius with mysql. Is there some kind of 
> script to easily add 
> a fake stop date/time to a user when one gets missed? 
> Currently I am looking 
> them up in the accounting table and manually editing the 
> entry. Would like to 
> find something that just takes username as input and creates 
> a stop based on 
> current date/time. We don't use the accounting for anything 
> other than 
> getting usage reports so if a few users are incorrect , no matter.
> 
> This happens frequently ( several times a week) that we don't 
> get stop packets 
> from our upstream. Then when users attempt a login, 
> simultaneous use check 
> item kicks in and denies them. They claim there is nothing 
> they can do about 
> it.
> 
> -- 
> 
> Chuck
> 
> - 
> List info/subscribe/unsubscribe? See 
> http://www.freeradius.org/list/users.html
> 




More information about the Freeradius-Users mailing list