reasoning/question about accounting_onoff_query

Peter Nixon listuser at peternixon.net
Sun Dec 23 16:06:09 CET 2007


On Tue 18 Dec 2007, Guy Fraser wrote:
> On 2007-Dec-17, at 15:33, Peter Nixon wrote:
> > On Mon 17 Dec 2007, Duane Cox wrote:
> >> Correct me if I'm wrong...
> >>
> >> But I believe the "accounting_onoff_query" is to be executed by a
> >> rebooting nas, or other similiar situation, so that all accounts
> >> that are
> >> currently "online" or specifiically all accounting records that are
> >> open
> >> (START), are to be closed, only accounts pertaining to that
> >> specific nas..
> >> Well that's how I read the conf file.
> >>
> >> If so, souldn't the query also update the AcctStatusType to "Stop" ??
> >>
> >> I've looked over all the db examples, and they are pretty much the
> >> same,
> >> update the StopTime, SessionTime, TerminateCause, etc, but they don't
> >> update the StatusType... why?
> >
> > Possibly, although if there is a acctstoptime then the StatusType is
> > not
> > really necessary. Maybe the StatusType should be set to "off" or
> > something
> > similar to be explicit about how the record was closed... (These
> > type of
> > behaviours are not defined by RFCs so we try to come up with the most
> > logical/usefull setup)
> >
> > Cheers
>
> I agree with Peter on this one. I would set the Acct-Terminate-Cause to
> something like NAS-Reset. Setting the Acct-Status-Type to Stop would
> in fact be misrepresenting the facts. In practice we do no "Bill"
> customers
> for use if we do not get a valid stop record, but we also configure a
> maximum
> session time, because our NAS provider does not support interim updates.

Infact we already set the AcctTerminateCause to what the NAS sends:

AcctTerminateCause='%{Acct-Terminate-Cause}'


-- 

Peter Nixon
http://peternixon.net/



More information about the Freeradius-Devel mailing list