Lines Matching refs:sm

23 #define STATE_MACHINE_ADDR sm->addr
30 sm->eapol->cb.set_port_authorized(sm->eapol->conf.ctx, sm->sta, 1)
32 sm->eapol->cb.set_port_authorized(sm->eapol->conf.ctx, sm->sta, 0)
35 #define txCannedFail() eapol_auth_tx_canned_eap(sm, 0)
36 #define txCannedSuccess() eapol_auth_tx_canned_eap(sm, 1)
37 #define txReq() eapol_auth_tx_req(sm)
38 #define abortAuth() sm->eapol->cb.abort_auth(sm->eapol->conf.ctx, sm->sta)
39 #define txKey() sm->eapol->cb.tx_key(sm->eapol->conf.ctx, sm->sta)
43 static void eapol_sm_step_run(struct eapol_state_machine *sm);
45 static void eapol_auth_initialize(struct eapol_state_machine *sm);
86 static void eapol_auth_tx_canned_eap(struct eapol_state_machine *sm, in eapol_auth_tx_canned_eap() argument
94 eap.identifier = ++sm->last_eap_id; in eapol_auth_tx_canned_eap()
97 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_DEBUG, in eapol_auth_tx_canned_eap()
100 sm->eapol->cb.eapol_send(sm->eapol->conf.ctx, sm->sta, in eapol_auth_tx_canned_eap()
103 sm->dot1xAuthEapolFramesTx++; in eapol_auth_tx_canned_eap()
107 static void eapol_auth_tx_req(struct eapol_state_machine *sm) in eapol_auth_tx_req() argument
109 if (sm->eap_if->eapReqData == NULL || in eapol_auth_tx_req()
110 wpabuf_len(sm->eap_if->eapReqData) < sizeof(struct eap_hdr)) { in eapol_auth_tx_req()
111 eapol_auth_logger(sm->eapol, sm->addr, in eapol_auth_tx_req()
118 if (sm->flags & EAPOL_SM_WAIT_START) { in eapol_auth_tx_req()
121 MAC2STR(sm->addr)); in eapol_auth_tx_req()
125 sm->last_eap_id = eap_get_id(sm->eap_if->eapReqData); in eapol_auth_tx_req()
126 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_DEBUG, in eapol_auth_tx_req()
128 sm->last_eap_id); in eapol_auth_tx_req()
129 sm->eapol->cb.eapol_send(sm->eapol->conf.ctx, sm->sta, in eapol_auth_tx_req()
131 wpabuf_head(sm->eap_if->eapReqData), in eapol_auth_tx_req()
132 wpabuf_len(sm->eap_if->eapReqData)); in eapol_auth_tx_req()
133 sm->dot1xAuthEapolFramesTx++; in eapol_auth_tx_req()
134 if (eap_get_type(sm->eap_if->eapReqData) == EAP_TYPE_IDENTITY) in eapol_auth_tx_req()
135 sm->dot1xAuthEapolReqIdFramesTx++; in eapol_auth_tx_req()
137 sm->dot1xAuthEapolReqFramesTx++; in eapol_auth_tx_req()
201 sm->portMode = Auto; in SM_STATE()
213 sm->keyRun = false; in SM_STATE()
219 int from_initialize = sm->auth_pae_state == AUTH_PAE_INITIALIZE; in SM_STATE()
220 bool pre_auth_logoff = sm->auth_pae_state == AUTH_PAE_ABORTING && in SM_STATE()
221 sm->eapolLogoff && !sm->authenticated; in SM_STATE()
222 bool logoff = sm->eapolLogoff; in SM_STATE()
224 if (sm->eapolLogoff) { in SM_STATE()
225 if (sm->auth_pae_state == AUTH_PAE_CONNECTING) in SM_STATE()
226 sm->authEapLogoffsWhileConnecting++; in SM_STATE()
227 else if (sm->auth_pae_state == AUTH_PAE_AUTHENTICATED) in SM_STATE()
228 sm->authAuthEapLogoffWhileAuthenticated++; in SM_STATE()
233 sm->authPortStatus = Unauthorized; in SM_STATE()
235 sm->reAuthCount = 0; in SM_STATE()
236 sm->eapolLogoff = false; in SM_STATE()
238 if (sm->eapol->cb.finished(sm->eapol->conf.ctx, sm->sta, 0, in SM_STATE()
239 sm->flags & EAPOL_SM_PREAUTH, in SM_STATE()
240 sm->remediation, logoff)) { in SM_STATE()
243 sm->stopped = true; in SM_STATE()
251 if (sm->auth_pae_state == AUTH_PAE_AUTHENTICATED) { in SM_STATE()
252 if (sm->reAuthenticate) in SM_STATE()
253 sm->authAuthReauthsWhileAuthenticated++; in SM_STATE()
254 if (sm->eapolStart) in SM_STATE()
255 sm->authAuthEapStartsWhileAuthenticated++; in SM_STATE()
256 if (sm->eapolLogoff) in SM_STATE()
257 sm->authAuthEapLogoffWhileAuthenticated++; in SM_STATE()
262 sm->eap_if->eapRestart = true; in SM_STATE()
268 if (sm->auth_pae_state != AUTH_PAE_CONNECTING) in SM_STATE()
269 sm->authEntersConnecting++; in SM_STATE()
273 sm->reAuthenticate = false; in SM_STATE()
274 sm->reAuthCount++; in SM_STATE()
280 if (sm->auth_pae_state == AUTH_PAE_AUTHENTICATING && sm->authFail) in SM_STATE()
281 sm->authAuthFailWhileAuthenticating++; in SM_STATE()
285 sm->authPortStatus = Unauthorized; in SM_STATE()
287 sm->quietWhile = sm->quietPeriod; in SM_STATE()
288 sm->eapolLogoff = false; in SM_STATE()
290 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_WARNING, in SM_STATE()
292 sm->eap_type_authsrv, in SM_STATE()
293 eap_server_get_name(0, sm->eap_type_authsrv)); in SM_STATE()
294 if (sm->eap_type_authsrv != sm->eap_type_supp) { in SM_STATE()
295 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_INFO, in SM_STATE()
297 "%d (%s)", sm->eap_type_supp, in SM_STATE()
298 eap_server_get_name(0, sm->eap_type_supp)); in SM_STATE()
300 sm->eapol->cb.finished(sm->eapol->conf.ctx, sm->sta, 0, in SM_STATE()
301 sm->flags & EAPOL_SM_PREAUTH, sm->remediation, in SM_STATE()
310 if (sm->auth_pae_state == AUTH_PAE_AUTHENTICATING && sm->authSuccess) in SM_STATE()
311 sm->authAuthSuccessesWhileAuthenticating++; in SM_STATE()
315 sm->authPortStatus = Authorized; in SM_STATE()
317 sm->reAuthCount = 0; in SM_STATE()
318 if (sm->flags & EAPOL_SM_PREAUTH) in SM_STATE()
320 else if (sm->flags & EAPOL_SM_FROM_PMKSA_CACHE) in SM_STATE()
322 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_INFO, in SM_STATE()
324 sm->eap_type_authsrv, in SM_STATE()
325 eap_server_get_name(0, sm->eap_type_authsrv), in SM_STATE()
327 if (sm->authSuccess) in SM_STATE()
328 sm->authenticated++; in SM_STATE()
329 sm->eapol->cb.finished(sm->eapol->conf.ctx, sm->sta, 1, in SM_STATE()
330 sm->flags & EAPOL_SM_PREAUTH, sm->remediation, in SM_STATE()
339 sm->eapolStart = false; in SM_STATE()
340 sm->authSuccess = false; in SM_STATE()
341 sm->authFail = false; in SM_STATE()
342 sm->authTimeout = false; in SM_STATE()
343 sm->authStart = true; in SM_STATE()
344 sm->keyRun = false; in SM_STATE()
345 sm->keyDone = false; in SM_STATE()
351 if (sm->auth_pae_state == AUTH_PAE_AUTHENTICATING) { in SM_STATE()
352 if (sm->authTimeout) in SM_STATE()
353 sm->authAuthTimeoutsWhileAuthenticating++; in SM_STATE()
354 if (sm->eapolStart) in SM_STATE()
355 sm->authAuthEapStartsWhileAuthenticating++; in SM_STATE()
356 if (sm->eapolLogoff) in SM_STATE()
357 sm->authAuthEapLogoffWhileAuthenticating++; in SM_STATE()
362 sm->authAbort = true; in SM_STATE()
363 sm->keyRun = false; in SM_STATE()
364 sm->keyDone = false; in SM_STATE()
372 sm->authPortStatus = Authorized; in SM_STATE()
374 sm->portMode = ForceAuthorized; in SM_STATE()
375 sm->eapolStart = false; in SM_STATE()
384 sm->authPortStatus = Unauthorized; in SM_STATE()
386 sm->portMode = ForceUnauthorized; in SM_STATE()
387 sm->eapolStart = false; in SM_STATE()
394 if ((sm->portControl == Auto && sm->portMode != sm->portControl) || in SM_STEP()
395 sm->initialize || !sm->eap_if->portEnabled) in SM_STEP()
397 else if (sm->portControl == ForceAuthorized && in SM_STEP()
398 sm->portMode != sm->portControl && in SM_STEP()
399 !(sm->initialize || !sm->eap_if->portEnabled)) in SM_STEP()
401 else if (sm->portControl == ForceUnauthorized && in SM_STEP()
402 sm->portMode != sm->portControl && in SM_STEP()
403 !(sm->initialize || !sm->eap_if->portEnabled)) in SM_STEP()
406 switch (sm->auth_pae_state) { in SM_STEP()
411 if (!sm->stopped) in SM_STEP()
415 if (!sm->eap_if->eapRestart) in SM_STEP()
419 if (sm->quietWhile == 0) in SM_STEP()
423 if (sm->eapolLogoff || sm->reAuthCount > sm->reAuthMax) in SM_STEP()
425 else if ((sm->eap_if->eapReq && in SM_STEP()
426 sm->reAuthCount <= sm->reAuthMax) || in SM_STEP()
427 sm->eap_if->eapSuccess || sm->eap_if->eapFail) in SM_STEP()
431 if (sm->eapolStart || sm->reAuthenticate) in SM_STEP()
433 else if (sm->eapolLogoff || !sm->portValid) in SM_STEP()
437 if (sm->authSuccess && sm->portValid) in SM_STEP()
439 else if (sm->authFail || in SM_STEP()
440 (sm->keyDone && !sm->portValid)) in SM_STEP()
442 else if (sm->eapolStart || sm->eapolLogoff || in SM_STEP()
443 sm->authTimeout) in SM_STEP()
447 if (sm->eapolLogoff && !sm->authAbort) in SM_STEP()
449 else if (!sm->eapolLogoff && !sm->authAbort) in SM_STEP()
453 if (sm->eapolStart) in SM_STEP()
457 if (sm->eapolStart) in SM_STEP()
473 sm->eap_if->eapNoReq = false; in SM_STATE()
474 sm->authAbort = false; in SM_STATE()
483 sm->eap_if->eapReq = false; in SM_STATE()
484 sm->backendOtherRequestsToSupplicant++; in SM_STATE()
497 sm->eapolEap = false; in SM_STATE()
505 sm->authTimeout = false; in SM_STATE()
506 sm->eapolEap = false; in SM_STATE()
507 sm->eap_if->eapNoReq = false; in SM_STATE()
508 sm->aWhile = sm->serverTimeout; in SM_STATE()
509 sm->eap_if->eapResp = true; in SM_STATE()
511 sm->backendResponses++; in SM_STATE()
520 sm->authSuccess = true; in SM_STATE()
521 sm->keyRun = true; in SM_STATE()
530 sm->authFail = true; in SM_STATE()
538 sm->authTimeout = true; in SM_STATE()
546 sm->authStart = false; in SM_STATE()
554 sm->eap_if->eapNoReq = false; in SM_STATE()
560 if (sm->portControl != Auto || sm->initialize || sm->authAbort) { in SM_STEP()
565 switch (sm->be_auth_state) { in SM_STEP()
570 if (sm->eapolEap) in SM_STEP()
572 else if (sm->eap_if->eapReq) in SM_STEP()
574 else if (sm->eap_if->eapTimeout) in SM_STEP()
578 if (sm->eap_if->eapNoReq) in SM_STEP()
580 if (sm->eap_if->eapReq) { in SM_STEP()
581 sm->backendAccessChallenges++; in SM_STEP()
583 } else if (sm->aWhile == 0) in SM_STEP()
585 else if (sm->eap_if->eapFail) { in SM_STEP()
586 sm->backendAuthFails++; in SM_STEP()
588 } else if (sm->eap_if->eapSuccess) { in SM_STEP()
589 sm->backendAuthSuccesses++; in SM_STEP()
603 if (sm->eap_if->eapFail && sm->authStart) in SM_STEP()
605 else if (sm->eap_if->eapReq && sm->authStart) in SM_STEP()
607 else if (sm->eap_if->eapSuccess && sm->authStart) in SM_STEP()
611 if (sm->eapolEap) in SM_STEP()
613 else if (sm->eap_if->eapReq) in SM_STEP()
615 else if (sm->eap_if->eapTimeout) in SM_STEP()
629 sm->reAuthWhen = sm->reAuthPeriod; in SM_STATE()
637 sm->reAuthenticate = true; in SM_STATE()
638 sm->eapol->cb.eapol_event(sm->eapol->conf.ctx, sm->sta, in SM_STATE()
645 if (sm->portControl != Auto || sm->initialize || in SM_STEP()
646 sm->authPortStatus == Unauthorized || !sm->reAuthEnabled) { in SM_STEP()
651 switch (sm->reauth_timer_state) { in SM_STEP()
653 if (sm->reAuthWhen == 0) in SM_STEP()
679 sm->eap_if->eapKeyAvailable = false; in SM_STATE()
680 sm->keyDone = true; in SM_STATE()
686 if (sm->initialize || sm->portControl != Auto) { in SM_STEP()
691 switch (sm->auth_key_tx_state) { in SM_STEP()
693 if (sm->keyTxEnabled && sm->eap_if->eapKeyAvailable && in SM_STEP()
694 sm->keyRun && !(sm->flags & EAPOL_SM_USES_WPA)) in SM_STEP()
698 if (!sm->keyTxEnabled || !sm->keyRun) in SM_STEP()
700 else if (sm->eap_if->eapKeyAvailable) in SM_STEP()
721 sm->rxKey = false; in SM_STATE()
727 if (sm->initialize || !sm->eap_if->portEnabled) { in SM_STEP()
732 switch (sm->key_rx_state) { in SM_STEP()
734 if (sm->rxKey) in SM_STEP()
738 if (sm->rxKey) in SM_STEP()
753 sm->operControlledDirections = Both; in SM_STATE()
760 sm->operControlledDirections = sm->adminControlledDirections; in SM_STATE()
766 if (sm->initialize) { in SM_STEP()
771 switch (sm->ctrl_dir_state) { in SM_STEP()
773 if (sm->eap_if->portEnabled && sm->operEdge) in SM_STEP()
777 if (sm->operControlledDirections != in SM_STEP()
778 sm->adminControlledDirections) in SM_STEP()
780 if (!sm->eap_if->portEnabled || !sm->operEdge) in SM_STEP()
794 struct eapol_state_machine *sm; in eapol_auth_alloc() local
800 sm = os_zalloc(sizeof(*sm)); in eapol_auth_alloc()
801 if (sm == NULL) { in eapol_auth_alloc()
806 sm->radius_identifier = -1; in eapol_auth_alloc()
807 os_memcpy(sm->addr, addr, ETH_ALEN); in eapol_auth_alloc()
808 sm->flags = flags; in eapol_auth_alloc()
810 sm->eapol = eapol; in eapol_auth_alloc()
811 sm->sta = sta_ctx; in eapol_auth_alloc()
814 sm->auth_pae_state = AUTH_PAE_INITIALIZE; in eapol_auth_alloc()
815 sm->quietPeriod = AUTH_PAE_DEFAULT_quietPeriod; in eapol_auth_alloc()
816 sm->reAuthMax = AUTH_PAE_DEFAULT_reAuthMax; in eapol_auth_alloc()
818 sm->be_auth_state = BE_AUTH_INITIALIZE; in eapol_auth_alloc()
819 sm->serverTimeout = BE_AUTH_DEFAULT_serverTimeout; in eapol_auth_alloc()
821 sm->reauth_timer_state = REAUTH_TIMER_INITIALIZE; in eapol_auth_alloc()
822 sm->reAuthPeriod = eapol->conf.eap_reauth_period; in eapol_auth_alloc()
823 sm->reAuthEnabled = eapol->conf.eap_reauth_period > 0; in eapol_auth_alloc()
825 sm->auth_key_tx_state = AUTH_KEY_TX_NO_KEY_TRANSMIT; in eapol_auth_alloc()
827 sm->key_rx_state = KEY_RX_NO_KEY_RECEIVE; in eapol_auth_alloc()
829 sm->ctrl_dir_state = CTRL_DIR_IN_OR_BOTH; in eapol_auth_alloc()
831 sm->portControl = Auto; in eapol_auth_alloc()
836 sm->keyTxEnabled = true; in eapol_auth_alloc()
839 sm->keyTxEnabled = false; in eapol_auth_alloc()
841 sm->portValid = false; in eapol_auth_alloc()
843 sm->portValid = true; in eapol_auth_alloc()
849 sm->eap = eap_server_sm_init(sm, &eapol_cb, eapol->conf.eap_cfg, in eapol_auth_alloc()
851 if (sm->eap == NULL) { in eapol_auth_alloc()
852 eapol_auth_free(sm); in eapol_auth_alloc()
855 sm->eap_if = eap_get_interface(sm->eap); in eapol_auth_alloc()
857 eapol_auth_initialize(sm); in eapol_auth_alloc()
860 sm->identity = (u8 *) os_strdup(identity); in eapol_auth_alloc()
861 if (sm->identity) in eapol_auth_alloc()
862 sm->identity_len = os_strlen(identity); in eapol_auth_alloc()
865 sm->radius_cui = wpabuf_alloc_copy(radius_cui, in eapol_auth_alloc()
869 if (radius_gen_session_id((u8 *) &sm->acct_multi_session_id, in eapol_auth_alloc()
870 sizeof(sm->acct_multi_session_id)) < 0) { in eapol_auth_alloc()
871 eapol_auth_free(sm); in eapol_auth_alloc()
876 return sm; in eapol_auth_alloc()
880 void eapol_auth_free(struct eapol_state_machine *sm) in eapol_auth_free() argument
882 if (sm == NULL) in eapol_auth_free()
885 eloop_cancel_timeout(eapol_port_timers_tick, NULL, sm); in eapol_auth_free()
886 eloop_cancel_timeout(eapol_sm_step_cb, sm, NULL); in eapol_auth_free()
887 if (sm->eap) in eapol_auth_free()
888 eap_server_sm_deinit(sm->eap); in eapol_auth_free()
890 wpabuf_free(sm->radius_cui); in eapol_auth_free()
891 os_free(sm->identity); in eapol_auth_free()
892 os_free(sm); in eapol_auth_free()
903 static void eapol_sm_step_run(struct eapol_state_machine *sm) in eapol_sm_step_run() argument
905 struct eapol_authenticator *eapol = sm->eapol; in eapol_sm_step_run()
911 os_memcpy(addr, sm->addr, ETH_ALEN); in eapol_sm_step_run()
920 prev_auth_pae = sm->auth_pae_state; in eapol_sm_step_run()
921 prev_be_auth = sm->be_auth_state; in eapol_sm_step_run()
922 prev_reauth_timer = sm->reauth_timer_state; in eapol_sm_step_run()
923 prev_auth_key_tx = sm->auth_key_tx_state; in eapol_sm_step_run()
924 prev_key_rx = sm->key_rx_state; in eapol_sm_step_run()
925 prev_ctrl_dir = sm->ctrl_dir_state; in eapol_sm_step_run()
928 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr)) in eapol_sm_step_run()
930 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr)) in eapol_sm_step_run()
933 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr)) in eapol_sm_step_run()
935 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr)) in eapol_sm_step_run()
938 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr)) in eapol_sm_step_run()
941 if (prev_auth_pae != sm->auth_pae_state || in eapol_sm_step_run()
942 prev_be_auth != sm->be_auth_state || in eapol_sm_step_run()
943 prev_reauth_timer != sm->reauth_timer_state || in eapol_sm_step_run()
944 prev_auth_key_tx != sm->auth_key_tx_state || in eapol_sm_step_run()
945 prev_key_rx != sm->key_rx_state || in eapol_sm_step_run()
946 prev_ctrl_dir != sm->ctrl_dir_state) { in eapol_sm_step_run()
950 eapol_auth_step(sm); in eapol_sm_step_run()
954 if (eapol_sm_sta_entry_alive(eapol, addr) && sm->eap) { in eapol_sm_step_run()
955 if (eap_server_sm_step(sm->eap)) { in eapol_sm_step_run()
959 eapol_auth_step(sm); in eapol_sm_step_run()
964 if (sm->eap_if->aaaEapResp) { in eapol_sm_step_run()
965 sm->eap_if->aaaEapResp = false; in eapol_sm_step_run()
966 if (sm->eap_if->aaaEapRespData == NULL) { in eapol_sm_step_run()
971 sm->eapol->cb.aaa_send( in eapol_sm_step_run()
972 sm->eapol->conf.ctx, sm->sta, in eapol_sm_step_run()
973 wpabuf_head(sm->eap_if->aaaEapRespData), in eapol_sm_step_run()
974 wpabuf_len(sm->eap_if->aaaEapRespData)); in eapol_sm_step_run()
979 sm->eapol->cb.eapol_event(sm->eapol->conf.ctx, sm->sta, in eapol_sm_step_run()
986 struct eapol_state_machine *sm = eloop_ctx; in eapol_sm_step_cb() local
987 eapol_sm_step_run(sm); in eapol_sm_step_cb()
998 void eapol_auth_step(struct eapol_state_machine *sm) in eapol_auth_step() argument
1006 eloop_register_timeout(0, 0, eapol_sm_step_cb, sm, NULL); in eapol_auth_step()
1010 static void eapol_auth_initialize(struct eapol_state_machine *sm) in eapol_auth_initialize() argument
1012 sm->initializing = true; in eapol_auth_initialize()
1015 sm->initialize = true; in eapol_auth_initialize()
1016 eapol_sm_step_run(sm); in eapol_auth_initialize()
1017 sm->initialize = false; in eapol_auth_initialize()
1018 eapol_sm_step_run(sm); in eapol_auth_initialize()
1019 sm->initializing = false; in eapol_auth_initialize()
1022 eloop_cancel_timeout(eapol_port_timers_tick, NULL, sm); in eapol_auth_initialize()
1023 eloop_register_timeout(1, 0, eapol_port_timers_tick, NULL, sm); in eapol_auth_initialize()
1031 struct eapol_state_machine *sm = ctx; in eapol_sm_get_eap_user() local
1034 ret = sm->eapol->cb.get_eap_user(sm->eapol->conf.ctx, identity, in eapol_sm_get_eap_user()
1037 sm->remediation = 1; in eapol_sm_get_eap_user()
1044 struct eapol_state_machine *sm = ctx; in eapol_sm_get_eap_req_id_text() local
1045 *len = sm->eapol->conf.eap_req_id_text_len; in eapol_sm_get_eap_req_id_text()
1046 return sm->eapol->conf.eap_req_id_text; in eapol_sm_get_eap_req_id_text()
1052 struct eapol_state_machine *sm = ctx; in eapol_sm_get_erp_send_reauth_start() local
1053 return sm->eapol->conf.erp_send_reauth_start; in eapol_sm_get_erp_send_reauth_start()
1059 struct eapol_state_machine *sm = ctx; in eapol_sm_get_erp_domain() local
1060 return sm->eapol->conf.erp_domain; in eapol_sm_get_erp_domain()
1067 struct eapol_state_machine *sm = ctx; in eapol_sm_erp_get_key() local
1068 return sm->eapol->cb.erp_get_key(sm->eapol->conf.ctx, keyname); in eapol_sm_erp_get_key()
1074 struct eapol_state_machine *sm = ctx; in eapol_sm_erp_add_key() local
1075 return sm->eapol->cb.erp_add_key(sm->eapol->conf.ctx, erp); in eapol_sm_erp_add_key()
1091 int eapol_auth_eap_pending_cb(struct eapol_state_machine *sm, void *ctx) in eapol_auth_eap_pending_cb() argument
1093 if (sm == NULL || ctx == NULL || ctx != sm->eap) in eapol_auth_eap_pending_cb()
1096 eap_sm_pending_cb(sm->eap); in eapol_auth_eap_pending_cb()
1097 eapol_auth_step(sm); in eapol_auth_eap_pending_cb()
1103 void eapol_auth_reauthenticate(struct eapol_state_machine *sm) in eapol_auth_reauthenticate() argument
1106 MACSTR, MAC2STR(sm->addr)); in eapol_auth_reauthenticate()
1107 sm->reAuthenticate = true; in eapol_auth_reauthenticate()
1108 eapol_auth_step(sm); in eapol_auth_reauthenticate()
1112 int eapol_auth_set_conf(struct eapol_state_machine *sm, const char *param, in eapol_auth_set_conf() argument
1117 MAC2STR(sm->addr), param, value); in eapol_auth_set_conf()
1121 sm->adminControlledDirections = Both; in eapol_auth_set_conf()
1123 sm->adminControlledDirections = In; in eapol_auth_set_conf()
1126 eapol_auth_step(sm); in eapol_auth_set_conf()
1132 sm->portControl = ForceAuthorized; in eapol_auth_set_conf()
1134 sm->portControl = ForceUnauthorized; in eapol_auth_set_conf()
1136 sm->portControl = Auto; in eapol_auth_set_conf()
1139 eapol_auth_step(sm); in eapol_auth_set_conf()
1144 sm->quietPeriod = atoi(value); in eapol_auth_set_conf()
1149 sm->serverTimeout = atoi(value); in eapol_auth_set_conf()
1154 sm->reAuthPeriod = atoi(value); in eapol_auth_set_conf()
1160 sm->reAuthEnabled = true; in eapol_auth_set_conf()
1162 sm->reAuthEnabled = false; in eapol_auth_set_conf()
1165 eapol_auth_step(sm); in eapol_auth_set_conf()
1171 sm->keyTxEnabled = true; in eapol_auth_set_conf()
1173 sm->keyTxEnabled = false; in eapol_auth_set_conf()
1176 eapol_auth_step(sm); in eapol_auth_set_conf()