Unlang regular expression string expansion.

Arran Cudbard-Bell A.Cudbard-Bell at sussex.ac.uk
Wed Aug 22 17:49:35 CEST 2007


Hi,

HP access point with mac authentication.

Sends mac as User-Name in lower case,
Sends mac as Calling-Station-ID in upper case.

Check to see if mac based authentication is being attempted is if 
User-Name == Calling-Station-ID.

As the case differs the two don't match.


if(%{User-Name} =~ /%{Calling-Station-ID}/i){

Doesn't expand %{Calling-Station-ID} , but thats expected.

if(%{User-Name} =~ "/%{Calling-Station-ID}/i"){

Gives error.

Leaves no way to do case insensitive equality checks between strings 
with unlang...

Any chance of expanding regex strings before passing them to the regex 
parser ?
Or == becomes non-strict equality and === becomes strict equality.

Thanks,
Arran




More information about the Freeradius-Users mailing list