String expansion of attributes value from database

Krzysztof Grobelak krzysztof.grobelak at enet.ie
Tue Jul 12 11:17:05 CEST 2016


Hello All,

Is it possible to have similar functionality in a database stored reply item as with users file?

in users file:

user1      Cleartext-Password := “super_secret"
                       Alc-Subsc-ID-Str := "%{Alc-Client-Hardware-Addr}",
                       Alc-Subsc-Prof-Str := "sub_profile_1",
                       Alc-SLA-Prof-Str := “sla_profile_1"

The above works and the %{Alc-Client-Hardware-Addr} gets expanded to a correct mac address.

However when the following is used in database:

+----+----------------+--------------------+----+-------------------------------+
| id | groupname      | attribute          | op | value                         |
+----+----------------+--------------------+----+-------------------------------+
|  1 | profile_1 | Alc-Subsc-ID-Str   | := | "%{Alc-Client-Hardware-Addr}" |
|  2 | profile_1 | Alc-Subsc-Prof-Str | := | sub_profile_1                 |
|  3 | profile_1 | Alc-SLA-Prof-Str   | := | sla_profile_1                 |
+----+----------------+--------------------+----+-------------------------------+

The value of Alc-Subsc-ID-Str attribute is returned as is, without expansion.

The comments in the sql module say that the sql should mirror the users file in functionality so i’m assuming i’m missing something ;)

Can you advice please?

Regards,
Kris


More information about the Freeradius-Users mailing list