Hi Alan,
Those examples should do the trick, except I have one follow-up question.  Accounting messages come through after a client is authenticated.  Since the EAP handler will be gone by then, how does freeradius know to send Accounting-Request messages to rlm_eap (assuming I add an accounting handler there)?  Or does it do something else?  The Accounting-Request will have a Class or Vendor-Specific attribute, but probably not EAP, so I'm still not sure where to put my handler.

Regards,
Dave

Alan DeKok wrote:
Dave Mason <[EMAIL PROTECTED]> wrote:

1) As I mentioned in a previous question, I'm writing a new EAP type. To support the accounting procedure we want to use, I may need to return Access-Accept with a Class or Vendor-Specific attribute. Could you advise me how to do this from with rlm_eap framework?

 Look at src/modules/rlm_example/rlm_example.c


2) My second question concerns how to process the incoming accounting data from the client. I have not studied accounting as much as authentication, so I'm a little rusty. From radiusd.conf it appears that accounting is an RLM module, but I don't see an rlm_acct in the modules directory. I looked through src/main/acct.c and found the rad_accounting() function that looks to be where everything happens, along with the stuff in modules.c. When accounting data comes in (including Class or Vendor-Specific attributes) I'll need to parse it and send it to a backend system, but I'm not sure where to put that code.

Huh? You don't have to parse anything, that's the point of the
module system.

Look at the 'accounting' section for modules which do accounting.
Then look in those modules, and read their accounting routines.

Alan DeKok.





- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to