[PATCH]: clear station statistic on accounting start

Matthias Wermann matt
Tue Dec 7 13:27:17 PST 2004


Am Donnerstag, 2. Dezember 2004 14:22 schrieb Gunter Burchardt:
> Hi Jouni,
>
> >    * new session id for the new session. */
> >   accounting_sta_stop(hapd, sta);
> >   accounting_sta_get_id(hapd, sta);
> >
> > Generating a new sessionid is a great idea (i had a not submitted patch
> > for my own doing this) but you missid one thing. You have to reset the
> > accounting data in driver! At the moment it is only possible to do this
> > by deleting the station from driver and readd the station. A new IOCTRL
> > only reseting the stats would be fine. I have such an IOCTRL in
> > PAE-module.
>
> I have written a patch for clearing station stats on an accounting
> start. This guaranties that no already accounted data will be send to
> radius server. This patch is only a suggestion. I know your objections
> against (new) IOCTRLs, but i think this is a usefull extension.

Hi,

I can confirm that there still seems to be really a problem (hostap CVS 
20041206):

Tue Dec  7 15:45:36 2004
        Acct-Session-Id = "41B4DC04-00000007"
        Acct-Status-Type = Stop
        Calling-Station-Id = "00-02-DD-34-65-xx"
        Acct-Session-Time = 12167
        Acct-Input-Octets = 2516871
        Acct-Output-Octets = 13880197

Tue Dec  7 15:45:45 2004
        Acct-Session-Id = "41B4DC04-0000000A"
        Acct-Status-Type = Start
        Calling-Station-Id = "00-02-DD-34-65-xx"

Tue Dec  7 15:50:46 2004
        Acct-Session-Id = "41B4DC04-0000000A"
        Acct-Status-Type = Alive
        Calling-Station-Id = "00-02-DD-34-65-xx"
        Acct-Input-Octets = 2529142
        Acct-Output-Octets = 13883212

Tue Dec  7 15:55:47 2004
        Acct-Session-Id = "41B4DC04-0000000A"
        Acct-Status-Type = Alive
        Calling-Station-Id = "00-02-DD-34-65-xx"
        Acct-Input-Octets = 2530162
        Acct-Output-Octets = 13883878

The old Acct-Data plus the new one's are written to the new session records.

Matt.
-- 
  Matthias Wermann, matt at emsnet.de (s/ at /@/)




More information about the Hostap mailing list