Multi-value attributes in client section
Hi, Is it possible to define multi-value attributes for clients and use them with unlang if conditions? For example: client abc { ipaddr = xxxx secret = xxxx group = "123" group = "456" } Then use it in a policy: if ("%{client:group[*]}" == "123") This does not seem to work, freeradius only keeps the first assignment (group = "123"), it seems. Is there any way to make it work like this? Or can I use something else for this purpose? Any client should belong to multiple groups. Regards, Rahman Duran Bilgi İşlem Daire Başkanlığı Erzurum Teknik Üniversitesi 444 5 388 - 2730
On Apr 8, 2022, at 9:08 AM, Rahman DURAN <rahman.duran@erzurum.edu.tr> wrote:
Is it possible to define multi-value attributes for clients and use them with unlang if conditions?
No.
For example:
client abc { ipaddr = xxxx secret = xxxx group = "123" group = "456" }
Then use it in a policy:
if ("%{client:group[*]}" == "123")
Nothing in the documentation says that will work. As a result, it doesn't work.
This does not seem to work, freeradius only keeps the first assignment (group = "123"), it seems. Is there any way to make it work like this? Or can I use something else for this purpose? Any client should belong to multiple groups.
The source is available. Patches are always welcome. Alan DeKok.
participants (2)
-
Alan DeKok -
Rahman DURAN