Hi, Hope this is a quick request for someone to answer, been googling and can't find the reply. I've altered the post-auth sql recording data a bit from the standard schema - I wanted to record some of the details of the request packet without relying on the NAS to do "proper" accounting, which I haven't got into yet. I'd quite like to record the attribute ClientShortname as referred to by the clients.conf file, but expansion of '%{request:Client-Short-Name}' didn't seem to work - blank string. Can I do this? Sometimes the "Nas-Identifier" attribute reported by the NAS isn't all that useful and the local definition in the clients file would be better. Thanks Andy
On 21/08/12 13:33, Franks Andy (RLZ) IT Systems Engineer wrote:
Hi,
Hope this is a quick request for someone to answer, been googling and can’t find the reply.
I’ve altered the post-auth sql recording data a bit from the standard schema–Iwanted to record some of the details of the request packet without relying on the NAS to do “proper” accounting, which I haven’t got into yet. I’d quite like to record the attributeClientShortname as referred to by the clients.conf file, butexpansion of‘%{request:Client-Short-Name}’didn’t seem to work – blank string.
Typo; you want: Client-Shortname
Franks Andy (RLZ) IT Systems Engineer wrote:
‘%{request:Client-Short-Name}’ didn’t seem to work – blank string.
Use: %{client:foo} This expands to the "foo" entry of the relevant "client" section: client stuff { ipaddr = 1.2.3.4 secret = hello foo = bar bad = good black = white } Note that *will* work! %{client:black} will return the string "white". Alan DeKok.
On Tue, Aug 21, 2012 at 01:33:00PM +0100, Franks Andy (RLZ) IT Systems Engineer wrote:
got into yet. I'd quite like to record the attribute ClientShortname as referred to by the clients.conf file, but expansion of '%{request:Client-Short-Name}' didn't seem to work - blank string.
Looking at dictionary.freeradius.internal (and xlat.c) - try %{Client-Shortname}. Matthew -- Matthew Newton, Ph.D. <mcn4@le.ac.uk> Systems Architect (UNIX and Networks), Network Services, I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom For IT help contact helpdesk extn. 2253, <ithelp@le.ac.uk>
participants (4)
-
Alan DeKok -
Franks Andy (RLZ) IT Systems Engineer -
Matthew Newton -
Phil Mayers