EAP server: Allow reauth to be started with passthrough
[libeap.git] / src / eap_server / eap_server.c
index a2e5bde..6dae69b 100644 (file)
@@ -147,6 +147,13 @@ SM_STATE(EAP, INITIALIZE)
        sm->eap_if.eapRestart = FALSE;
 
        /*
+        * Start reauthentication with identity request even if we know the
+        * previously used identity. This is needed to get reauthentication
+        * started properly.
+        */
+       sm->start_reauth = TRUE;
+
+       /*
         * This is not defined in RFC 4137, but method state needs to be
         * reseted here so that it does not remain in success state when
         * re-authentication starts.
@@ -1255,9 +1262,12 @@ struct eap_sm * eap_server_sm_init(void *eapol_ctx,
        sm->wps = conf->wps;
        if (conf->assoc_wps_ie)
                sm->assoc_wps_ie = wpabuf_dup(conf->assoc_wps_ie);
+       if (conf->assoc_p2p_ie)
+               sm->assoc_p2p_ie = wpabuf_dup(conf->assoc_p2p_ie);
        if (conf->peer_addr)
                os_memcpy(sm->peer_addr, conf->peer_addr, ETH_ALEN);
        sm->fragment_size = conf->fragment_size;
+       sm->pwd_group = conf->pwd_group;
 
        wpa_printf(MSG_DEBUG, "EAP: Server state machine created");
 
@@ -1292,6 +1302,7 @@ void eap_server_sm_deinit(struct eap_sm *sm)
        os_free(sm->eap_if.aaaEapKeyData);
        eap_user_free(sm->user);
        wpabuf_free(sm->assoc_wps_ie);
+       wpabuf_free(sm->assoc_p2p_ie);
        os_free(sm);
 }