Using rml_perl to modify calling_station_id and set as sql_user_name

blaqb0x at netscape.net blaqb0x at netscape.net
Mon May 31 18:37:16 CEST 2010


 

 Hi,

 I'm trying to get mac authentication to a mysql database where the mac addresses are stripped of all special characters.

If I add this line to the /sql/mysql/dialup.conf file

sql_user_name = "%{Calling-Station-Id}"

the calling-station-id (username passed to mysql) is the correct mac address however, it has still needs to have all the special characters (hyphens) removed.

Can someone show me an example of how to modify the calling-station-id?  I suppose using rlm_perl would be the best way as I could modify it using perl.

Thanks,



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100531/0d880aff/attachment.html>


More information about the Freeradius-Users mailing list