perl examples

A.L.M.Buxey at A.L.M.Buxey at
Mon Apr 8 15:24:10 CEST 2013


> In post-auth I want to 
> extract the nas-ip address and calling station-id of the client device
> open a db connection and perform a query that'll let me  decide what vlan-id to send back in the access-accept packet
> write radius attributes into the access-accept reply

one more comment...for somethign so 'trivial' I would seriously
consider using unlang to do this anyway eg

update reply {
		Tunnel-Private-Group-ID ="%{sql:SELECT vlan from authtable where NAS='%{NAS-IP-Address}' and csi='%{Calling-Station-Id}'}"
               Tunnel-Medium-Type = IEEE-802
               Tunnel-Type = VLAN

..or such...


More information about the Freeradius-Users mailing list