Even if I doubt it changes anything, my Freeradius version is 3.0.12, sorry I forgot to precise. Kind regards, Charles-Antoine Guillat-Guignard Le 30/01/2023 à 10:19, Charles-Antoine Guillat-Guignard via Freeradius-Users a écrit :
Hello,
I am trying to implement some db based attribute handling (names, operator and values from db), and I am struggling with a dynamic handling of attributes references (names).
Looking at https://freeradius.org/radiusd/man/unlang.txt (ATTRIBUTE REFERENCES section), I see no exemple matching what I want to do (attribute name is always known, and static).
What I try to achieve would look a bit like that (which doesn't work) : :
# Exemple for Attributes-Actions values # A-AL-AAA,:=,1 # A-AL-DHCP,:=,0
foreach &Attributes-Actions { update request { Attributes-Action := "%{Foreach-Variable-2}" }
%{explode:Attributes-Action ,}
update reply { # for debugging, contains expected value Reply-Message += "index 0 : %{Attributes-Action[0]}" # this fails "%{Attributes-Action[0]}" := "%{Attributes-Action[2]}" } }
Am I missing something? Is there another way to achieve dynamic handling of attributes names, to be able to modify an attribute whose name/reference is not pre-declared in unlang script (unknown in unlang script, but ofc declared in dictionary).
Thank you in advance.
Kind regards,
Charles-Antoine Guillat-Guignard
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html