add attribute FreeRADIUS-Client-NAS-Type in req accounting?
Alan DeKok
aland at deployingradius.com
Fri Sep 29 00:02:46 CEST 2017
On Sep 28, 2017, at 3:35 PM, Dmitry Yashin via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
>
> hi, how i can add attribute FreeRADIUS-Client-NAS-Type in accounting, i
> load
>
> &FreeRADIUS-Client-NAS-Type = "%{sql: SELECT type FROM nas WHERE host =
> '%{Packet-Src-IP-Address}'}"
>
> from dynamic_clients ,
That only gets used when defining the dynamic client. It's not available elsewhere/
> and in
>
> preacct {
> update request {
> &Acct-Unique-Session-Id :=
> "%{md5:%{User-Name},%{Acct-Session-ID},%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}},%{NAS-Identifier},%{NAS-Port-ID},%{NAS-Port}}"
> &FreeRADIUS-Client-NAS-Type := &control:FreeRADIUS-Client-NAS-Type
Just do the SQL SELECT again:
&FreeRADIUS-Client-NAS-Type = "%{sql: SELECT type FROM nas WHERE host = '%{Packet-Src-IP-Address}'}"
Alan DeKok.
More information about the Freeradius-Users
mailing list