Can translation of RADIUS packet attributes (e.g., NAS-Port-Type) be configured?

2011-08-17 Thread Jack Patmos
I am running FreeRADIUS 2.1.7. I am attempting to write accounting data to Postgres database. In the database the NAS port type from the request is stored as the integer value that defines the port type in RFC2865 (e.g., 19 - 'Wireless - IEEE 802.11'). The database table is fixed and cannot be

Re: Can translation of RADIUS packet attributes (e.g., NAS-Port-Type) be configured?

2011-08-17 Thread Jack Patmos
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}}', \ [...] However, I'm still

Re: Can translation of RADIUS packet attributes (e.g., NAS-Port-Type) be configured?

2011-08-17 Thread Fajar A. Nugraha
On Wed, Aug 17, 2011 at 4:13 PM, Jack Patmos jack.pat...@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

Re: Can translation of RADIUS packet attributes (e.g., NAS-Port-Type) be configured?

2011-08-17 Thread Jack Patmos
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. Understood, I will avoid doing that. Git log shows this ... It'd probably do what you want. If you