[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    Re: add attribute FreeRADIUS-Client-NAS-Type in req accounting?
From:       Alan DeKok <aland () deployingradius ! com>
Date:       2017-09-28 22:02:46
Message-ID: 9EE5C7C5-C5C1-4C0B-91EF-6C9F3EF49E42 () deployingradius ! com
[Download RAW message or body]

On Sep 28, 2017, at 3:35 PM, Dmitry Yashin via Freeradius-Users \
<freeradius-users@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.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic