How to use rewrite.called_station_id IN dynamic clients authorize section

A.L.M.Buxey at lboro.ac.uk A.L.M.Buxey at lboro.ac.uk
Thu Mar 26 21:25:52 CET 2015


hi,


use unlang and a regex check to convert the CSI into format needed
(or use the macaddress subclass native to postgres if thats your DB...then it doesnt really care

I'd advise using google as a good starting point eg start with this and adapt:

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}" 
        } 
} 


alan


More information about the Freeradius-Users mailing list