Hello! I'm writing my own module. What is the purpose of checksimul callback? When is it called? The prototype of this function is static int rlm_myrlm_checksimul(void *instance, REQUEST * request); hence it should modify something in request. Likely simul_count field. What function checks this (or maybe another) field? How can I set the maximum number of simultaneous sessions? Thank you beforehand! -- Sincerely yours, Dmitry V. Krivenok Orange System Company Saint-Petersburg, Russia work phone: +7 812 332-32-40 cellular phone: +7 921 576-70-91 e-mail: krivenok@orangesystem.ru web: http://www.orangesystem.ru skype: krivenok_dmitry jabber: krivenok_dmitry@jabber.ru icq: 242-526-443
Alan DeKok wrote:
Dmitry V. Krivenok wrote:
What is the purpose of checksimul callback?
Checking Simultaneous-Use.
When is it called?
When Simultaneous-Use is set.
If your module doesn't implement user accounting, don't implement this function.
I'm newbie here. I haven't learned all capabilities of freeradius yet. I just want to know what is the simplest way to disallow 2 simultaneous sessions. Are there any standard solutions? I found (in source of rlm_sql), that checking is based on analysis of accounting information. What if 2 Access-Requests arrive "simultaneously"? There is no accounting information available yet (it will become available just after receiving Accounting-Start). Hence it's not reliable to rely on accounting information only. Am I right? It seems to me that AAA and NAS may be not synchronized. So, we need to contact NAS somehow to determine active sessions and match them with accounting info. Looks like very complex task :(
Alan DeKok.
-- Sincerely yours, Dmitry V. Krivenok Orange System Company Saint-Petersburg, Russia work phone: +7 812 332-32-40 cellular phone: +7 921 576-70-91 e-mail: krivenok@orangesystem.ru web: http://www.orangesystem.ru skype: krivenok_dmitry jabber: krivenok_dmitry@jabber.ru icq: 242-526-443
Dmitry V. Krivenok wrote:
I just want to know what is the simplest way to disallow 2 simultaneous sessions. Are there any standard solutions?
Of course. See doc/Simultaneous-Use.
I found (in source of rlm_sql), that checking is based on analysis of accounting information.
What if 2 Access-Requests arrive "simultaneously"? There is no accounting information available yet (it will become available just after receiving Accounting-Start). Hence it's not reliable to rely on accounting information only. Am I right?
Yes.
It seems to me that AAA and NAS may be not synchronized. So, we need to contact NAS somehow to determine active sessions and match them with accounting info. Looks like very complex task :(
That's what the "checkrad" program is for. None of these issues are new. People thought of them, and came up with solutions, 10 years ago. These solutions are even documented in the server. Alan DeKok.
participants (2)
-
Alan DeKok -
Dmitry V. Krivenok