Multiple attributes / extraction of a specific value with unlang regex ?

Chaigneau, Nicolas nicolas.chaigneau at capgemini.com
Mon Feb 17 15:02:17 CET 2014


That's perfect, thanks a lot!

And it was described in unlang man, I missed it... my bad. 
Sorry :/



> -----Message d'origine-----
> De : freeradius-users-
> bounces+nicolas.chaigneau=capgemini.com at lists.freeradius.org
> [mailto:freeradius-users-
> bounces+nicolas.chaigneau=capgemini.com at lists.freeradius.org] De la
> part de Phil Mayers
> Envoyé : lundi 17 février 2014 13:04
> À : freeradius-users at lists.freeradius.org
> Objet : Re: Multiple attributes / extraction of a specific value with
> unlang regex ?
> 
> On 17/02/14 09:55, Chaigneau, Nicolas wrote:
> 
> > This works, but is not good enough because <value> might contain a
> comma.
> >
> > Is there a better way to do this with unlang ?
> 
> As Arran has said, foreach:
> 
>    foreach (Cisco-AVPair) {
>      if (Foreach-Variable-0 =~ /^circuit-id=(.+)/) {
>        update control {
>          My-Cisco-Circuit-Id := "%{1}"
>        }
>      }
>    }
> 
> At one point I submitted a patch to make the regexp operator logic loop
> through all matching values, but I think this functionality went away
> when unlang was rewritten.
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.



More information about the Freeradius-Users mailing list