Foreach-Variable-X and =~

Phil Mayers p.mayers at imperial.ac.uk
Fri May 16 16:40:23 CEST 2014


On 16/05/14 15:11, Chaigneau, Nicolas wrote:
> It works for me with a 3.0.2 FRD.
> I have a few differences in syntax, I'm not sure if it's important...
> Here is what I have:
> 		
> 		foreach Cisco-AVPair {
> 			if ("%{Foreach-Variable-0}" =~ /^circuit-id-tag=(.+)/ ) {
> 				update control {
> 					SRS-Cisco-Circuit-Id = "%{1}"
> 				}

Yeah I think it's need to be string-ified. Looking at the source code, 
Foreach-Variable-X aren't real attributes, they're only xlats. Shame, as 
it throws away type info unless you push it into an intermediate 
attribute of the same type.


More information about the Freeradius-Users mailing list