Decreasing connection time (Session-Timeout)

Thibault Le Meur Thibault.LeMeur at supelec.fr
Tue Oct 24 09:56:07 CEST 2006


> freeRadius than calls accounting_stop_query located in 
> sql.conf and UPDATES the radacct table and its attributes 
> with all these new values. 
> 
> What I'd like to do now is to execute a personalised sql 
> query right after this default accounting_stop_query so that 
> I could save/modify all the info I want. 
> 
> Or maybe is there another way to grab this Acct-Session-Time 
> and User-Name to update the correct user and modify his time left.
> 
> Any ideas? 

I don't know if it's possible to add any number of SQL queries to the sql
module: I let freeradius gurus the responsability to say...

However you can instantiate a new sql module in sql.conf:
sql my-sql-acct {
...
 Accounting_stop_query =" MY Customized SQL query"

}

Then in you radiusd.conf accounting section:
accounting {
  sql
  my-sql-acct
}

You may also want to enable the 'my-sql-acct' only for your ChilliSpot NAS.
You can do so by playing with Acct-Type (see doc/Acct-Type):
* use acct_users to set Acct-Type:=custom-sql for your NAS-IP-Address
* use an accounting section as below:
Accouning {
  sql
  Acct-Type custom-sql {
     my-sql-acct
  }
}

HTH,
Thibault





More information about the Freeradius-Users mailing list