Lower case to Upper case in Calling-Station-Id at policy.conf

Hilton Guaraldi guaraldi at gmail.com
Fri Sep 18 01:13:16 CEST 2009


Hi,

How can I use uc function below in order to change lower case to upper case?

Ex. 00-18-e7-41-ad-c2    --->  00-18-E7-41-AD-C2

In the policy.conf:

mac-phase {

        if("%{request:Calling-Station-Id}" =~
/([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2,})[-:]?([0-9a-f]{2})[-:]?([0-9A-F]{2})/i){
             update request {
                                     Calling-Station-Id :=
"%{1}-%{2}-%{3}-%{4}-%{5}-%{6}"
                                    }
        }
        else {
                noop
               }
        }


Best regards



More information about the Freeradius-Users mailing list