regular expression problem on 2.1.3

Tim Lightfoot Tim.Lightfoot at
Sun Jan 25 02:20:27 CET 2009

Thanks for suggestions on this, i will be looking into unlang...

I reverted my Radius box to 2.0.5 and did some digging into this problem
on another server.

It seems to be fail at line 83 of valuepair.c compiling the regular

		 *	Include substring matches.
		compare = regcomp(&reg, (char *)check->vp_strvalue,
		if (compare != 0) {
			char buffer[256];
			regerror(compare, &reg, buffer, sizeof(buffer));

			RDEBUG("Invalid regular expression %s: %s",
check->vp_strvalue, buffer);
			return -1; 

The debug output "Invalid regular expression : empty (sub)expression"
should show the contenst of the regex being passed to regcomp, it
appears as if check->vp_strvalue is an empty string, where it should
contain the regular expression, hence the failure in regcomp. In 2.0.5
values do get through in check->vp_strvalue.


-----Original Message-----
From: at
[ at lists.freeradi] On Behalf Of Alan DeKok
Sent: 24 January 2009 06:50
To: FreeRadius users mailing list
Subject: Re: regular expression problem on 2.1.3

Tim Lightfoot wrote:
> [files]         expand: %{NAS-IP-Address} ->
> [files] Invalid regular expression : empty (sub)expression <== problem

> here

  This error is being produced by the regular expression library on your
system.  FreeRADIUS is just asking the library to use the regular
expression... and it says no.

  The "users" file parser was changed in 2.1.x, but that was only to
deal with back-slashed.  It shouldn't be affecting this.

  Try using "unlang", as suggested elsewhere.

  Alan DeKok.
List info/subscribe/unsubscribe? See

More information about the Freeradius-Users mailing list