acct_unique blank NAS parameters

Nathan Ward lists+freeradius at daork.net
Mon Feb 8 12:41:49 CET 2016


Hi,

> On 8/02/2016, at 21:29, Fabricio Viana <fabricioviana at hotmail.com> wrote:
> 
> Hello!
> I'm having a strange problem with acct_unique module and simultaneous connections.
> In my first attempt is ok. The FreeRadius generates acctuniqueid smoothly:

(big mess)

> Then simulated an error: Quit FreeRadius, then I disconnected the client. Then I turned on the server and the client connected again.
> But there was an error in radacct : it created a new entry with the same Acct-Session-ID in the database instead of putting the acctstoptime the first connection.
> I realized that acctuniqueid was created differently:

(even more mess)

NASes will send stop messages when the client disconnects, and accounting-on/accounting-off messages when the NAS itself starts or stops - roughly. Out of the box, FreeRADIUS will act on those to set acctstoptime in your database.

If you stop FreeRADIUS from receiving those messages, there is no way for it to know that the client has disconnected, so it is behaving as expected and not setting acctstoptime.

If you need to have acctstoptime set for your sessions, you have to either:
1) Have a reliable RADIUS system so one of your RADIUS servers always gets stop or accounting-on/accounting-off packets.
2) Periodically go through your session table and fake acctstoptime for sessions that haven’t been updated in a while - perhaps 2 x your update interval, but you will need to decide this for your environment.

> Note that the NAS-Identifier, NAS-Port-ID and NAS-Port parameters are empty despite the package coming with the information!
> This is generating a new entry into radacct because md5 changes…

If I squint and really look hard at the mess that you’ve posted, it looks like the NAS-Port attribute is present, and changes between the first and second attempts, which generally means it’s a different session, so what you’ve got seems to be desired behaviour.

> Could someone please help me?

(yet more mess)

Sure, but, please format your email so the debug output doesn’t show all on one line, as that makes it almost impossible to read, and I’m pretty sure you’ve got several things mixed in at one point.

--
Nathan Ward




More information about the Freeradius-Users mailing list