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

Dmitry Yashin thefree at mail.ru
Thu Sep 28 21:35:57 CEST 2017


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 , 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
  }
 }

 accounting {
#  ok
  rest
 }

but in post on rest not see FreeRADIUS-Client-NAS-Type in log

Thu Sep 28 21:40:30 2017 : Debug: (324) # Executing section preacct from
file /etc/raddb/radiusd.conf
Thu Sep 28 21:40:30 2017 : Debug: (324)   preacct {
Thu Sep 28 21:40:30 2017 : Debug: (324)     update request {
Thu Sep 28 21:40:30 2017 : Debug: (324)       EXPAND
%{md5:%{User-Name},%{Acct-Session-ID},%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}},%{NAS-Identifier},%{NAS-Port-ID},%{NAS-Port}}
Thu Sep 28 21:40:30 2017 : Debug: (324)          -->
9f7d7ee63b81739f567f5703597b1556
Thu Sep 28 21:40:30 2017 : Debug: (324)       &Acct-Unique-Session-Id :=
9f7d7ee63b81739f567f5703597b1556
Thu Sep 28 21:40:30 2017 : Debug: (324)       No attributes updated
Thu Sep 28 21:40:30 2017 : Debug: (324)       No attributes updated
Thu Sep 28 21:40:30 2017 : Debug: (324)       No attributes updated
Thu Sep 28 21:40:30 2017 : Debug: (324)     } # update request = noop
Thu Sep 28 21:40:30 2017 : Debug: (324)   } # preacct = noop
Thu Sep 28 21:40:30 2017 : Debug: (324) # Executing section accounting from
file /etc/raddb/radiusd.conf
Thu Sep 28 21:40:30 2017 : Debug: (324)   accounting {
Thu Sep 28 21:40:30 2017 : Debug: (324)     modsingle[accounting]: calling
rest (rlm_rest)


More information about the Freeradius-Users mailing list