Re: [PATCH] Radius accounting proxy thread.
Vjacheslav Chekushin <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Organization | LMT |
| Message-ID | <[email protected]> |
Hi, Stipe.
Stipe Tolj wrote:
>
>>And I still have some questions.
>>1. Persistent storage for mapping.
>
>
> Yet not implemented. This should use gwlib/dbpool.c's dbpools, ie.
> using sqlite. But persistance has some implications: how do you delete
> entries after restarting Kannel and meanwhile a STOP packet should
> have been received to the RADIUS acct proxy? How does your acct proxy
> know about a dead mapping in the table?
>
We don't loose packets even if Kannel stoped.
Our forwarder resend packets untill they will be aknowledged.
But expierence show, that sometime RAS doesn't send STOP packet al all.
I did't shoose the way how I will clean up mapping table but I'll
impement some persistent storage anyway.
>
>>2. Why session and client table not cleaned when accounting "stop" packet received:
>>2003-10-06 14:09:11 [1] DEBUG: RADIUS: Mapping table contains 5 elements
>>2003-10-06 14:09:11 [1] DEBUG: RADIUS: Session table contains 53 elements
>>2003-10-06 14:09:11 [1] DEBUG: RADIUS: Client table contains 53 elements
>>
>>Is it a bug or planned behavior?
>
>
> good question ;) let's have a review in the code...
>
It is very simple patch, so I send it inline:
@@ -119,6 +119,8 @@
(comp_client_ip = dict_get(session_table, session_id)) != NULL &&
octstr_compare(client_ip, comp_client_ip) == 0) {
dict_remove(radius_table, client_ip);
+ dict_remove(client_table, client_ip);
+ dict_remove(session_table, session_id);
info(0, "RADIUS: Mapping `%s <-> %s' for session id <%s>
removed.",
octstr_get_cstr(client_ip), octstr_get_cstr(msisdn),
octstr_get_cstr(session_id));
> Stipe
>
> [email protected]
> -------------------------------------------------------------------
> Wapme Systems AG
>
> Vogelsanger Weg 80
> 40470 Düsseldorf
>
> Tel: +49-211-74845-0
> Fax: +49-211-74845-299
>
> E-Mail: [email protected]
> Internet: http://www.wapme-systems.de
> -------------------------------------------------------------------
> wapme.net - wherever you are
>
--
Vjacheslav Chekushin mailto:[email protected]
Latvian Mobile Phone Company http://www.lmt.lv