multiply Cisco-AVPair request attribute process by regular expression

Olivier Beytrison olivier at heliosnet.org
Mon Apr 29 09:06:06 CEST 2013


On 28.04.2013 23:30, Mehdi Ravanbakhsh wrote:
> DearOlivier
> 
> I am try to test it but why first one is working ?!!!  do you check my 
> regular expression in second one ?  i do it correctly ?

I'm quoting the man page.

man unlang :
%{Attribute-Name[index]}
  Reference  the N'th occurance of the given attribute.  The syntax
%{<list>:Attribute-Name[index]} may also be used.  The indexes start at
zero.  This feature is NOT available for non-attribute dynamic
translations, like %{sql:...}.

  For example, %{User-Name[0]} is the same as %{User-Name}

  The variable %{Cisco-AVPair[2]} will reference the value of the THIRD
Cisco-AVPair attribute (if it exists) in the request packet,

In your request you have 3 Cisco-AVPair. I don't know if they always
come in the same order or what, but looking at your request
    %{Cisco-AVPair[0]} = "client-mac-address=90f6.52d2.384f"
    %{Cisco-AVPair[1]} = "connect-progress=LAN Ses Up"
    %{Cisco-AVPair[2]} = "circuit-id-tag=Azadegan-1 atm 2/16:251:0.35"

Please NOTE the %{ } surrounding the attribute and its index.

> and is version 3 stable enough to use ? (your opinion )

Version 3 is a living thing. It can be stable one day and buggy the next
one.
I'm running Version 3 in production. I've froze the branch, tested it
carefully, cherry-picked the fix I needed, and deployed it. Version 3
brings some nice things and an important performance improvement.

Olivier

-- 

 Olivier Beytrison
 Network & Security Engineer, HES-SO Fribourg
 Mail: olivier at heliosnet.org


More information about the Freeradius-Users mailing list