StrLen of an Attribute

Nicolas Breuer Nicolas.Breuer at
Wed May 8 17:23:49 CEST 2019

Ok Alan so what is the correct syntax please ?

I saw in the doc
; %{#string}
: The number of characters in %{string}.  If %{string} is not set, then the length is not set.  This will NOT work for the one-character variables defined below.
: e.g. %{#Junk-junk:-foo} will yield the string "foo".

But ok this is not a string.

-----Message d'origine-----
De : Freeradius-Users < at> De la part de Alan DeKok
Envoyé : mercredi 8 mai 2019 17:19
À : FreeRadius users mailing list <freeradius-users at>
Objet : Re: StrLen of an Attribute

> On May 8, 2019, at 10:59 AM, Nicolas Breuer <Nicolas.Breuer at> wrote:
> Hello,
> Can you help how get the length of an attribute ?
> (%{#%{reply:Service-Type}} > 3)
> Returns "0"


  Because Service-Type isn't a string.  It's an attribute of type "integer".

  And why would you ever need to look at the string length of it?

  And why would you use "(%{#%{reply:Service-Type}}"   ? You're inventing syntax here.  Nothing in the the documentation says that you can use:


  Much less


  You can't just invent things and expect them to do what you want.  Computers don't work that way.

  Alan DeKok.

List info/subscribe/unsubscribe? See

More information about the Freeradius-Users mailing list