Acctstoptime same as acctstarttime

Alan DeKok aland at
Wed Jan 31 22:39:08 CET 2018

On Jan 31, 2018, at 3:44 PM, Yahn do Amaral Almeida Pinheiro <yahnaamaralp at> wrote:
> I'm using FreeRadius 2.1.12 and I gotta a database problem with the user
> connection registry. Can you help me?

 You should upgrade to 2.2.10.

> When the connection is registered, the acctstoptime field is filled with
> the same content from the acctstarttime field, the user doesn't loose
> connection but radius fills the field like it lost at the same time it
> started. However, when the user actually looses connection, the field gets
> updated to the right actual time.

 FreeRADIUS doesn't invent accounting data.  It receives accounting data from the NAS.  It then stores that data in the DB.

 So if the data in the DB is wrong, it's because the NAS sends the wrong data.

 What you *can* do is to check:

	if ((Acct-Status-Type == Interim-Update) && Acct-Stop-Time) {
		update request {
			Acct-Stop-Time !* ANY

 Put that at the top of the "preacct" section, and it should help.  You might need to edit it for v2... I haven't used that in years.

> As of now, I can't update my FreeRadius since it's the one being used for
> the clients and it can't stop at any time then.

 You should be able to build a new system, and then swap it over.

 Alan DeKok.

More information about the Freeradius-Users mailing list