multiple attribute instaces and radius variables (xlat)
FreeRAIUS documentation in 1.1.1 mentions a possibility of referencing specific AVPs in case of multiple instances of an attribute (%{Attr-Name[N]}). This is quite useful (and a nice addition!), but it doesn't seem to cover some situations (especially related to logging/accounting) where number of attribute instances is not known in advance. Is it possible to add something like %{Attr-Name[*]} that would expand to all values of an attribute and something like %{Attr-Name[#]} that would expand to number of attribute instances ? The toughest part of the above suggestion is which delimiter to use in case of [*] and if it is possible to make that delimiter configurable. -- Andriy Gapon
Andriy Gapon <avg@icyb.net.ua> wrote:
Is it possible to add something like %{Attr-Name[*]} that would expand to all values of an attribute and something like %{Attr-Name[#]} that would expand to number of attribute instances ?
This works in the CVS head. I'm not sure why it isn't in 1.1.1. Alan DeKok. \
Andriy Gapon <avg at icyb.net.ua> wrote:
Is it possible to add something like %{Attr-Name[*]} that would expand to all values of an attribute and something like %{Attr-Name[#]} that would expand to number of attribute instances ?
This works in the CVS head. I'm not sure why it isn't in 1.1.1.
Alan, thanks a lot for the information, I've pulled the latest version of xlat.c from CVS. It seems that the current version of xlat.c in HEAD is 1.107 2006/03/16, but 1.1.1 release has xlat.c 1.72.2.7.2.1 2005/12/08. BTW, I'd really love to see the delimiter for [*] and %Z be configurable, but I am not sure how hard to implement it (especially provide an interface) and if anybody besides me would use it. -- Andriy Gapon
participants (2)
-
Alan DeKok -
Andriy Gapon