#include "includes.h"
-#include "hostapd.h"
+#include "common.h"
#include "ieee802_1x.h"
#include "eapol_sm.h"
#include "eloop.h"
}
-/* Port Timers state machine - implemented as a function that will be called
- * once a second as a registered event loop timeout */
-
+/**
+ * eapol_port_timers_tick - Port Timers state machine
+ * @eloop_ctx: struct eapol_state_machine *
+ * @timeout_ctx: Not used
+ *
+ * This statemachine is implemented as a function that will be called
+ * once a second as a registered event loop timeout.
+ */
static void eapol_port_timers_tick(void *eloop_ctx, void *timeout_ctx)
{
struct eapol_state_machine *state = timeout_ctx;
}
}
+ if (state->eap_if->retransWhile > 0) {
+ state->eap_if->retransWhile--;
+ if (state->eap_if->retransWhile == 0) {
+ wpa_printf(MSG_DEBUG, "IEEE 802.1X: " MACSTR
+ " - (EAP) retransWhile --> 0",
+ MAC2STR(state->addr));
+ }
+ }
+
eapol_sm_step_run(state);
eloop_register_timeout(1, 0, eapol_port_timers_tick, eloop_ctx, state);
sm->portControl = Auto;
if (!eapol->conf.wpa &&
- (hapd->default_wep_key || eapol->conf.individual_wep_key_len > 0))
+ (eapol->default_wep_key || eapol->conf.individual_wep_key_len > 0))
sm->keyTxEnabled = TRUE;
else
sm->keyTxEnabled = FALSE;
eap_conf.eap_sim_aka_result_ind = eapol->conf.eap_sim_aka_result_ind;
eap_conf.tnc = eapol->conf.tnc;
eap_conf.wps = eapol->conf.wps;
+ eap_conf.assoc_wps_ie = sta->wps_ie;
sm->eap = eap_server_sm_init(sm, &eapol_cb, &eap_conf);
if (sm->eap == NULL) {
eapol_auth_free(sm);
}
+/**
+ * eapol_auth_step - Advance EAPOL state machines
+ * @sm: EAPOL state machine
+ *
+ * This function is called to advance EAPOL state machines after any change
+ * that could affect their state.
+ */
void eapol_auth_step(struct eapol_state_machine *sm)
{
/*
return NULL;
}
+ if (conf->individual_wep_key_len > 0) {
+ /* use key0 in individual key and key1 in broadcast key */
+ eapol->default_wep_key_idx = 1;
+ }
+
eapol->cb.eapol_send = cb->eapol_send;
eapol->cb.aaa_send = cb->aaa_send;
eapol->cb.finished = cb->finished;
return;
eapol_auth_conf_free(&eapol->conf);
+ os_free(eapol->default_wep_key);
os_free(eapol);
}