Can translation of RADIUS packet attributes (e.g., NAS-Port-Type) be configured?
Fajar A. Nugraha
list at fajar.net
Wed Aug 17 11:59:09 CEST 2011
On Wed, Aug 17, 2011 at 4:13 PM, Jack Patmos <jack.patmos at googlemail.com> wrote:
> Guess I should have persevered for another 10 minutes.
>
> I have found a solution to my problem, which is to change my
> accounting_*_query from:
>
> [...]
> '%{NAS-Port-Type}',
> [...]
>
> to:
> [...]
> '%{sql:SELECT shortname FROM ${nas_table} WHERE nasname = %{NAS-Port-Type}}', \
> [...]
It's not really the same thing, since you're using whatever is on
nas_table instead of the original integer value.
Also, "%{sql:" doesn't really work with redundant sql modules instances.
>
> However, I'm still curious if it's possible to configure the behaviour
> of FreeRADIUS in this regard?
Git log shows this
commit b74612c710d3d7e9fdfa4ebf8763877d25a0d3a9
Author: Alan T. DeKok <aland at freeradius.org>
Date: Tue Dec 21 10:01:16 2010 +0100
Added %{integer:...}
Which takes an argument like %{integer:Event-Timestamp}, and prints
it as an integer, bypassing all of the named enumeration and date/time
expansion
It'd probably do what you want. If you want to use that, I recommend
using v2.1.x branch from git instead of 2.1.11.
--
Fajar
More information about the Freeradius-Users
mailing list