[Proxy accounting based on SQL]

Phil Mayers p.mayers at imperial.ac.uk
Fri Apr 20 13:21:42 CEST 2012


On 20/04/12 11:39, Thomas Fagart wrote:

> When we use SQL module, in accounting part, it does insert accounting
> information into the SQL, but does not request information from the
> database. I know that I could change this SQL request in sql.conf (eg
> SELECT instead of INSERT), but will it work ?

No. rlm_sql will not perform the radcheck/radreply processing by default 
for accounting.

Two options:

1. Force use of the "authorize" processing path in your accounting section:

accounting {
  ...
  sql.authorize
  ...
}

2. Use SQL xlat to perform your query:

accounting {
   ...
   update control {
     Tmp-String-0 := "%{sql: query goes here}"
   }
   if (control:Tmp-String-0) {
    ... some conditional processing?
   }
   ...
}


More information about the Freeradius-Users mailing list