There are some problems in current radius account proxy implementation. First, as I mentioned before, is that Kannel RADIUS accounting proxy _allways_ forward incoming packets to somewhere (default localhost). I don't undestand why? In many cases kannel is the end point for these packets. I think that if remote_host not defined, then packets must not be forwarded.
Second problem is blocking read from UDP sockets. So if you start wapbox and then try to stop it, it waits for for packet from RAS forever:
2003-10-03 10:03:58 [0] DEBUG: Waiting for 1 (radius/radius_acct.c:proxy_thread) to terminate
And strace show us that wapbox wait data on socket:
[EMAIL PROTECTED] wapgw]$ strace -p18071 recvfrom(11, <unfinished ...>
Attached patch solve both problems. Please look at it.
I send two patches:
1) radius_accnt.patch - functionality patch
2) radius_accnt_style.patch with style modifications for patched radius_acct.c according doc/CodingStyle document. (can be apllied only after first patch)
And I still have some questions. 1. Persistent storage for mapping. 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?
-- Vjacheslav Chekushin mailto:[EMAIL PROTECTED] Latvian Mobile Phone Company http://www.lmt.lv
radius.tgz
Description: application/compressed
