eap_sim_db_receive is not called
j at w1.fi
Sun Sep 18 04:07:04 EDT 2011
On Wed, Sep 14, 2011 at 03:44:30PM -0700, Ming-Ching Tiew wrote:
> 1. Basically if one calls eloop_run() early, when there is
> nothing registered, then the function runs to completion
> and exited. So it was as good as not called.
Yes, that is expected behavior.
> 2. eloop_run() is a blocking function when something is registered,
> so in the hostapd code it daemonized everything else and keep
> its main thread to service eloop_run(). Which means when I
> used it in libeap.so I also have to provide a thread to service
I'm not sure whether running a separate thread for this is the best way
of integrating with other programs, but it is one option. The other
approach would be to implement the eloop API using whatever mechanism
the parent program is using.
> But I still failed to get the radius client to authenticate properly
> due to the PENDING reply behaviour - as I posted in freeradius maillist.
hostapd uses this to handle EAP authentication that depends on some
external data to avoid blocking the process.
> What I am not sure now is the purpose of the callback function in
> the context of using libeap.so for realtime radius client-server
> authentication. Maybe I did not do this correctly and the caused
> the failed radius authentication.
> I suspect because freeradius does not like the pending behaviour - so I
> probably will look inside libeap.so to change the pending behaviour
> of eap_sim_db to a blocking one.
Unless you are planning on creating a new thread for every EAP-SIM
authentication, that may not be very good idea..
What exactly are you trying to achieve here? It would likely be easier
to just run hostapd as an external process for the authentication and
proxy the queries through FreeRADIUS. Blocking the thread while waiting
for SIM parameters does not sound like a good solution and getting the
re-process-previous-EAP-message mechanism working may require
considerable amount of design changes within FreeRADIUS.
Jouni Malinen PGP id EFC895FA
More information about the HostAP