On 11/12/2015 3:55 μμ, Alan DeKok wrote:
So the question is... what else would you like to see in "unlang"?
Ideas? Comments?
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
I would like to see a new operator === which will return true if there is a single match in a list context. That way one can run a check such as: if (NAS-IP-Address === &control:NAS-IP-Address) { update reply { Reply-Message = "NAS IP Address not allowed" } reject } instead of: update control { Tmp-String-5 := 'REJECT' } foreach &control:NAS-IP-Address { if (NAS-IP-Address == "%{Foreach-Variable-0}"){ update control { Tmp-String-5 := 'ALLOW' } } } if (control:Tmp-String-5 == 'REJECT'){ update reply { Reply-Mssage = "NAS IP Address not allowed" } reject }