add attribute FreeRADIUS-Client-NAS-Type in req accounting?

Dmitry Yashin thefree at mail.ru
Sun Oct 1 13:14:14 CEST 2017


it's slow ... can some trick ? like

in dynamic client
tmp  {
    type.'%{Packet-Src-IP-Address}' = %{FreeRADIUS-Client-NAS-Type}
}

and use tmp.type.'%{Packet-Src-IP-Address}' in pre-acct ?

пт, 29 сент. 2017 г. в 1:02, Alan DeKok <aland at deployingradius.com>:

> 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