Simultaneous-Use For Group Using Unlang

det.explorer at yahoo.com det.explorer at yahoo.com
Wed Nov 9 14:40:07 CET 2011


Hi,

I was able to implement simultaneous-use checking for a group using exec-program-wait attribute. So a user logging in which belongs to the group will be checked against that attribute. It is working but I worry that with too many connections coming from this group of users, it will exhaust the MySQL connection. Because the program used in exec-program-wait opens new connection to MySQL everytime. And even when the program closes the MySQL connection, the port for the connection will not be freed up immediately. It takes sometimes before the port is released. It stays in the close_wait status for sometime.

I'd like to implement this using unlang but not sure where to start. The part that I am having difficulty is on where to create the procedure and how to call the procedure. The rest of the things like the DB query I can reuse from the existing program. I want to implement this using unlang to avoid having to open a new MySQL connection.

Any example, I can follow?

Thanks a lot!
Det



More information about the Freeradius-Users mailing list