[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnu-radius] Accounting trail in a proxy setup
From: |
Maurice Makaay |
Subject: |
[Bug-gnu-radius] Accounting trail in a proxy setup |
Date: |
Wed, 21 Jul 2004 13:54:13 +0200 |
Hi,
I ran into another problem in our proxy setup. We will also proxy the
accounting records to our customer. But to be able to present a bill
at the end of the month, we have to have those records ourselves too.
>From the manual (3.4.2.1) I can read the following statement:
"Note that when the accounting request passes through a chain of
forwarding servers, the accounting records are stored on all
servers in the chain."
Based on this I expected accounting information to appear on our local
radius server. However: if an accounting packet is sent to the
radius server and that packet is proxied to a remote radius server,
I'm not able to find it locally in any of my detail files.
I think the code is not doing what the manual states here. AFAIK, the
detail accounting logging is done by the function "rad_accounting".
This function is only called from radiusd/radius.c. In that function,
the flow looks somewhat like this:
switch (code)
accounting-request
if (proxied request) return
other requests
<not interesting right now>
switch (code)
accounting-request
rad_accounting() call
other requests
<not interesting right now>
So if I retrieve an accounting package and I am doing proxy for the realm,
the accounting package will be sent to the remote server. The code will
never get to the second switch statement, in which the package is written
to the detail file.
Proposal for a fix: Change radius_respond, so in the first switch statement,
the case for the accounting request will read:
case RT_ACCOUNTING_REQUEST:
stat_inc(acct, radreq->ipaddr, num_req);
! if (proxy_send(req) != 0) {
+ write_detail(radreq, REQ_AUTH_ZERO, "detail");
return 0;
+ }
break;
Or, of course, wake me up again like you have done some times before ;-)
With kind regards,
Maurice Makaay
- [Bug-gnu-radius] Accounting trail in a proxy setup,
Maurice Makaay <=