On Wed, May 29, 2002 at 09:07:43AM -0500, Chris Parker wrote: > At 08:00 AM 5/29/2002 +0000, Michael Bailey wrote: > >Hello, > > > >I would like to use freeradius to offer a prepaid service where users > >can buy a certain number of days and will have unlimited use untill that > >period is up. > > Use the 'rlm_counter' or 'rlm_sqlcounter' module. This is exactly what > they were created for.
I don't think running a counter be the correct approach for this task. I want users to be able to connect for as many hours as they wish between now and next Tuesday. It's the date, not the number of hours online, that determines whether they can connect or not. So the only counter I need is the system clock. Does anyone have a neat way of doing this (and returning Session-Timeout)? I have altered the authorize_reply_query to compare current date with timeout date to calculate and return Session-Timeout but this only allows one reply value. Is there somewhere else I can insert reply values as well? The rlm_sqlcounter should be useful for another task, implementing bandwidth limits. It's only in the CVS version at the moment and I think I'll wait for it to go into a release before putting it on production systems. cheers, Mike - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
