2017-09-29 14:10 GMT+02:00 Alan DeKok <aland@deployingradius.com>:
On Sep 29, 2017, at 4:09 AM, Ti Ti <tt91em@gmail.com> wrote:
Thanks. In case of counters how can I use the policy? Because I have to specify the db in sql_module_instance
You will need to create multiple instances of the sql_counter module, and use that:
sqlcounter dailycountertime_db1 { sql_module_instance = db1 ... }
sqlcounter dailycountertime_db2 { sql_module_instance = db2 ...
}
and then reference "dailycountertime_db2" as the module to run inside of the "if" block.
Alan DeKok.
In that case the counters will be referenced both in authorize section and in accounting and session sections. This can be a problem? if (&NAS-Identifier =~ /test1/i) { db1 dailycounter_db1 noresetcounter_db1 } ---------- server rad { listen { ipaddr = * port = 1812 type = auth } listen { ipaddr = * port = 1821 type = acct } authorize { check-nas-id ... } accounting { check-nas-id exec attr_filter.accounting_response } session { check-nas-id } post-auth { exec Post-Auth-Type REJECT { check-nas-id attr_filter.access_reject } } pre-proxy { } post-proxy { eap } }