annoying stop retransmissions.
Fajar A. Nugraha
list at fajar.net
Tue Nov 29 10:20:17 CET 2011
On Tue, Nov 29, 2011 at 3:57 PM, Alan DeKok <aland at deployingradius.com> wrote:
> Alexandre Chapellon wrote:
>> I don't understand what you mean by "writing a detailed state
>> machine"... state machine?
>
> Write down what the server receives, and what you want to do with it.
> The server receives accounting on/off start/stop and alive packets.
> It can receive those when a session is non-existent, open, or closed.
>
> How does the server determine the "right" thing to do? Write down the
> logic. Then, implement it.
For comparison purposes, we currently implement some config and db
schema modifications to better handle accounting packets. For example:
- always return ok on accounting packets that the NAS sends.
Implementing it requires using detail reader/writer and some unlang
blocks to catch some weird corner cases (e.g. Acct-Session-Time=0)
- use unique constraint on acctuniqueid
- remove all *_alt queries
- split "live" accounting table (those with Acct-Status-Type <>
'Stop') and "archive" accounting table
- change most insert/update queries to "INSERT .... ON DUPLICATE KEY
UPDATE ...."
- use "DELETE IGNORE" to delete records from "live" accounting table
Took some effort, but it works. @Alexandre: some of the logic might be
relevant for your situation as well.
--
Fajar
More information about the Freeradius-Users
mailing list