Additional functionality of rlm_sql
Hi, We use freeradius mainly to proxy requests for wholesale customers of ours. For some of them we provide additional services such as session tracking and ip allocation. Currently we do it with our modified version of rlm_sql. The modification is just an extension of the module (no changes to existing procedures). We've added handling for 'preaccounting' (which is an exact copy of 'accounting') and post-proxy, which runs a single sql query for all 'Access-Accept' packets (we allocate ip here, using a stored procedure in postgresql). The patch is against the 1.1.6 version, but it shouldn't be too difficult to get it against the current one. Is anyone interested? And a question to maintainers - what are the odds of incorporating that functionality in the HEAD version? kind regards Pshem
On Tue 07 Aug 2007, Pshem Kowalczyk wrote:
Hi,
We use freeradius mainly to proxy requests for wholesale customers of ours. For some of them we provide additional services such as session tracking and ip allocation. Currently we do it with our modified version of rlm_sql.
The modification is just an extension of the module (no changes to existing procedures). We've added handling for 'preaccounting' (which is an exact copy of 'accounting') and post-proxy, which runs a single sql query for all 'Access-Accept' packets (we allocate ip here, using a stored procedure in postgresql).
The patch is against the 1.1.6 version, but it shouldn't be too difficult to get it against the current one.
Is anyone interested? And a question to maintainers - what are the odds of incorporating that functionality in the HEAD version?
Have you looked at cvs HEAD? We are doing exactly what you mention with an unmodified cvs HEAD... Cheers -- Peter Nixon http://peternixon.net/
Hi
Have you looked at cvs HEAD? We are doing exactly what you mention with an unmodified cvs HEAD...
I just had a look at the current rlm_sql: RCSID("$Id: rlm_sql.c,v 1.171 2007/07/27 09:55:13 nbk Exp $") (...) module_t rlm_sql = { RLM_MODULE_INIT, "SQL", RLM_TYPE_THREAD_SAFE, /* type: reserved */ rlm_sql_instantiate, /* instantiation */ rlm_sql_detach, /* detach */ { NULL, /* authentication */ rlm_sql_authorize, /* authorization */ NULL, /* preaccounting */ rlm_sql_accounting, /* accounting */ rlm_sql_checksimul, /* checksimul */ NULL, /* pre-proxy */ NULL, /* post-proxy */ rlm_sql_postauth /* post-auth */ }, }; Or am I looking in the wrong place? regards Pshem
On Wed 08 Aug 2007, Pshem Kowalczyk wrote:
Hi
Have you looked at cvs HEAD? We are doing exactly what you mention with an unmodified cvs HEAD...
I just had a look at the current rlm_sql:
RCSID("$Id: rlm_sql.c,v 1.171 2007/07/27 09:55:13 nbk Exp $")
(...)
module_t rlm_sql = { RLM_MODULE_INIT, "SQL", RLM_TYPE_THREAD_SAFE, /* type: reserved */ rlm_sql_instantiate, /* instantiation */ rlm_sql_detach, /* detach */ { NULL, /* authentication */ rlm_sql_authorize, /* authorization */ NULL, /* preaccounting */ rlm_sql_accounting, /* accounting */ rlm_sql_checksimul, /* checksimul */ NULL, /* pre-proxy */ NULL, /* post-proxy */ rlm_sql_postauth /* post-auth */ }, };
Or am I looking in the wrong place?
No. Thats correct. My point is that you don't need to add extra queries. What you want to do is already possible with the existing setup... -- Peter Nixon http://peternixon.net/
Hi, I'm most likely missing the point, but how can I execute a query on post-proxy or preacounting using that module? kind regards Pshem
participants (2)
-
Peter Nixon -
Pshem Kowalczyk