Unable to use regexp in virtual server

"RESTOUX, Loïc" loic.restoux at capgemini.com
Thu Mar 5 13:52:40 CET 2015

Hi everyone,

I checked out the 3.0.x branch this morning, and I can't get it working.

Part of the configuration is:

     authorize {
         foreach Cisco-AVPair {
             if ("%{Foreach-Variable-0}" =~ /^circuit-id-tag=(.+)/ ) {
                 <do something>

The startup fails with the following error:

<file>[38]: Invalid regular expression:
<file>[38]: ^circuit-id-tag=(.+)
<file>[38]:                     ^

Apparently, the failure comes from the computation of the size of the 
pattern. regex_compile() tries to find a NULL value in the 23 characters 
of the regexp, when obviously the length of the pattern is only 20.

Am I missing something in the syntax of the virtual server configuration ?

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