Foreach-Variable-X and =~

Alan DeKok aland at deployingradius.com
Fri May 16 16:50:02 CEST 2014


Phil Mayers wrote:
> Does this work for anyone else? I'm running 3.0.x HEAD, and finding that
> this:
> 
>    if (Cisco-AVPair) {
>        foreach &Cisco-AVPair {
>            if (Foreach-Variable-0 =~ /^audit-session-id=(.+)$/) {

  Foreach-Variable-N is magic.  :(

  Use this instead: "%{Foreach-Variable-0}"

  Or, "git pull".

  I've put a check in for this.  It's ~10 lines of code, and means
people won't get surprised and annoyed.

  Alan DeKok.


More information about the Freeradius-Users mailing list