[PATCH] Add eapol_sm_notify_eap_config function to eapol_supp_sm.c.
Jouni Malinen
j
Wed Jan 14 11:14:44 PST 2009
On Wed, Jan 14, 2009 at 11:37:02AM +0900, David Smith (?) wrote:
> This function is for reconfiguring the EAPOL state machine when the EAP
> configuration is changed, either by reconfiguring smartcard modules over
> DBus or a reload of the config file.
>
> Also, modify ctrl_iface_dbus_handlers.c and wpa_supplicant.c to use new
> interface.
Hmm.. Is this change really needed for DBus case?
wpas_dbus_iface_set_smartcard_modules() is already calling
eapol_sm_deinit() followed by wpa_supplicant_init_eapol() which will in
practice deinit and init EAP peer which seems to be exactly what the
proposed new eapol_sm_notify_eap_config() function is doing. Not that
I'm saying that this is the best way of doing the update (thanks for
pointing out that place for me ;-).
The EAPOL code should already be notified of configuration changes with
eapol_sm_notify_config() call. Since EAPOL is the owner of EAP, this EAP
peer update should probably be done from the eapol_sm_notify_config()
call instead of providing a separate new function for this
functionality to bypass most of EAPOL processing.
It would also be closer to EAPOL design if a new EAP peer function were
added to notify it about configuration changes instead of doing this
with full deinit/init.
I do not like the part of getting from one to three places where the
struct eap_config is filled in. It is prone to errors (this patch being
a good example of this by breaking WPS ;-). It would be better to get
that part into a shared function so that only one place needs to be
modified whenever adding new entries into struct eap_config.
Getting both DBus and configuration file reload handlers doing the same
thing is good direction, but unless I have missed something, I would
prefer this to go through eapol_sm_notify_config() with likely a new
helper function in wpas_glue.c that can be used to get the updated
smartcard parameters first into EAPOL and then from the EAPOL code into
EAP.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list