Lines Matching defs:wpa_auth
23 #include "wpa_auth.h"
37 static void wpa_group_sm_step(struct wpa_authenticator *wpa_auth,
40 static int wpa_gtk_update(struct wpa_authenticator *wpa_auth,
42 static int wpa_group_config_group_keys(struct wpa_authenticator *wpa_auth,
58 struct wpa_authenticator *wpa_auth, const u8 *addr)
60 if (wpa_auth->cb.mic_failure_report)
61 return wpa_auth->cb.mic_failure_report(wpa_auth->cb.ctx, addr);
66 static inline void wpa_auth_set_eapol(struct wpa_authenticator *wpa_auth,
70 if (wpa_auth->cb.set_eapol)
71 wpa_auth->cb.set_eapol(wpa_auth->cb.ctx, addr, var, value);
75 static inline int wpa_auth_get_eapol(struct wpa_authenticator *wpa_auth,
78 if (wpa_auth->cb.get_eapol == NULL)
80 return wpa_auth->cb.get_eapol(wpa_auth->cb.ctx, addr, var);
84 static inline const u8 * wpa_auth_get_psk(struct wpa_authenticator *wpa_auth,
87 if (wpa_auth->cb.get_psk == NULL)
89 return wpa_auth->cb.get_psk(wpa_auth->cb.ctx, addr, prev_psk);
93 static inline int wpa_auth_get_msk(struct wpa_authenticator *wpa_auth,
96 if (wpa_auth->cb.get_msk == NULL)
98 return wpa_auth->cb.get_msk(wpa_auth->cb.ctx, addr, msk, len);
102 static inline int wpa_auth_set_key(struct wpa_authenticator *wpa_auth,
107 if (wpa_auth->cb.set_key == NULL)
109 return wpa_auth->cb.set_key(wpa_auth->cb.ctx, vlan_id, alg, addr, idx,
114 static inline int wpa_auth_get_seqnum(struct wpa_authenticator *wpa_auth,
117 if (wpa_auth->cb.get_seqnum == NULL)
119 return wpa_auth->cb.get_seqnum(wpa_auth->cb.ctx, addr, idx, seq);
124 wpa_auth_send_eapol(struct wpa_authenticator *wpa_auth, const u8 *addr,
127 if (wpa_auth->cb.send_eapol == NULL)
129 return wpa_auth->cb.send_eapol(wpa_auth->cb.ctx, addr, data, data_len,
134 int wpa_auth_for_each_sta(struct wpa_authenticator *wpa_auth,
138 if (wpa_auth->cb.for_each_sta == NULL)
140 return wpa_auth->cb.for_each_sta(wpa_auth->cb.ctx, cb, cb_ctx);
144 int wpa_auth_for_each_auth(struct wpa_authenticator *wpa_auth,
148 if (wpa_auth->cb.for_each_auth == NULL)
150 return wpa_auth->cb.for_each_auth(wpa_auth->cb.ctx, cb, cb_ctx);
154 void wpa_auth_logger(struct wpa_authenticator *wpa_auth, const u8 *addr,
157 if (wpa_auth->cb.logger == NULL)
159 wpa_auth->cb.logger(wpa_auth->cb.ctx, addr, level, txt);
163 void wpa_auth_vlogger(struct wpa_authenticator *wpa_auth, const u8 *addr,
170 if (wpa_auth->cb.logger == NULL)
182 wpa_auth_logger(wpa_auth, addr, level, format);
188 static void wpa_sta_disconnect(struct wpa_authenticator *wpa_auth,
191 if (wpa_auth->cb.disconnect == NULL)
194 wpa_auth->cb.disconnect(wpa_auth->cb.ctx, addr,
216 struct wpa_authenticator *wpa_auth = eloop_ctx;
218 if (random_get_bytes(wpa_auth->group->GMK, WPA_GMK_LEN)) {
222 wpa_auth_logger(wpa_auth, NULL, LOGGER_DEBUG, "GMK rekeyd");
224 wpa_auth->group->GMK, WPA_GMK_LEN);
227 if (wpa_auth->conf.wpa_gmk_rekey) {
228 eloop_register_timeout(wpa_auth->conf.wpa_gmk_rekey, 0,
229 wpa_rekey_gmk, wpa_auth, NULL);
236 struct wpa_authenticator *wpa_auth = eloop_ctx;
239 wpa_auth_logger(wpa_auth, NULL, LOGGER_DEBUG, "rekeying GTK");
240 for (group = wpa_auth->group; group; group = group->next) {
244 wpa_group_sm_step(wpa_auth, group);
248 if (wpa_auth->conf.wpa_group_rekey) {
249 eloop_register_timeout(wpa_auth->conf.wpa_group_rekey,
250 0, wpa_rekey_gtk, wpa_auth, NULL);
257 struct wpa_authenticator *wpa_auth = eloop_ctx;
260 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_DEBUG, "rekeying PTK");
277 struct wpa_authenticator *wpa_auth = ctx;
278 wpa_auth_for_each_sta(wpa_auth, wpa_auth_pmksa_clear_cb, entry);
282 static int wpa_group_init_gmk_and_counter(struct wpa_authenticator *wpa_auth,
297 os_memcpy(buf, wpa_auth->addr, ETH_ALEN);
314 static struct wpa_group * wpa_group_init(struct wpa_authenticator *wpa_auth,
325 group->GTK_len = wpa_cipher_key_len(wpa_auth->conf.wpa_group);
339 if (wpa_group_init_gmk_and_counter(wpa_auth, group) < 0) {
352 wpa_group_sm_step(wpa_auth, group);
354 wpa_group_sm_step(wpa_auth, group);
372 struct wpa_authenticator *wpa_auth;
374 wpa_auth = os_zalloc(sizeof(struct wpa_authenticator));
375 if (wpa_auth == NULL)
377 os_memcpy(wpa_auth->addr, addr, ETH_ALEN);
378 os_memcpy(&wpa_auth->conf, conf, sizeof(*conf));
379 os_memcpy(&wpa_auth->cb, cb, sizeof(*cb));
381 if (wpa_auth_gen_wpa_ie(wpa_auth)) {
383 os_free(wpa_auth);
387 wpa_auth->group = wpa_group_init(wpa_auth, 0, 1);
388 if (wpa_auth->group == NULL) {
389 os_free(wpa_auth->wpa_ie);
390 os_free(wpa_auth);
394 wpa_auth->pmksa = pmksa_cache_auth_init(wpa_auth_pmksa_free_cb,
395 wpa_auth);
396 if (wpa_auth->pmksa == NULL) {
398 os_free(wpa_auth->wpa_ie);
399 os_free(wpa_auth);
404 wpa_auth->ft_pmk_cache = wpa_ft_pmk_cache_init();
405 if (wpa_auth->ft_pmk_cache == NULL) {
407 os_free(wpa_auth->wpa_ie);
408 pmksa_cache_auth_deinit(wpa_auth->pmksa);
409 os_free(wpa_auth);
414 if (wpa_auth->conf.wpa_gmk_rekey) {
415 eloop_register_timeout(wpa_auth->conf.wpa_gmk_rekey, 0,
416 wpa_rekey_gmk, wpa_auth, NULL);
419 if (wpa_auth->conf.wpa_group_rekey) {
420 eloop_register_timeout(wpa_auth->conf.wpa_group_rekey, 0,
421 wpa_rekey_gtk, wpa_auth, NULL);
424 return wpa_auth;
428 int wpa_init_keys(struct wpa_authenticator *wpa_auth)
430 struct wpa_group *group = wpa_auth->group;
434 wpa_group_sm_step(wpa_auth, group);
436 wpa_group_sm_step(wpa_auth, group);
443 * @wpa_auth: Pointer to WPA authenticator data from wpa_init()
445 void wpa_deinit(struct wpa_authenticator *wpa_auth)
449 eloop_cancel_timeout(wpa_rekey_gmk, wpa_auth, NULL);
450 eloop_cancel_timeout(wpa_rekey_gtk, wpa_auth, NULL);
453 while (wpa_auth->stsl_negotiations)
454 wpa_stsl_remove(wpa_auth, wpa_auth->stsl_negotiations);
457 pmksa_cache_auth_deinit(wpa_auth->pmksa);
460 wpa_ft_pmk_cache_deinit(wpa_auth->ft_pmk_cache);
461 wpa_auth->ft_pmk_cache = NULL;
464 os_free(wpa_auth->wpa_ie);
466 group = wpa_auth->group;
473 os_free(wpa_auth);
479 * @wpa_auth: Pointer to WPA authenticator data from wpa_init()
482 int wpa_reconfig(struct wpa_authenticator *wpa_auth,
486 if (wpa_auth == NULL)
489 os_memcpy(&wpa_auth->conf, conf, sizeof(*conf));
490 if (wpa_auth_gen_wpa_ie(wpa_auth)) {
499 group = wpa_auth->group;
500 group->GTK_len = wpa_cipher_key_len(wpa_auth->conf.wpa_group);
502 wpa_group_sm_step(wpa_auth, group);
504 wpa_group_sm_step(wpa_auth, group);
511 wpa_auth_sta_init(struct wpa_authenticator *wpa_auth, const u8 *addr)
520 sm->wpa_auth = wpa_auth;
521 sm->group = wpa_auth->group;
527 int wpa_auth_sta_associated(struct wpa_authenticator *wpa_auth,
530 if (wpa_auth == NULL || !wpa_auth->conf.wpa || sm == NULL)
535 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_DEBUG,
548 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_DEBUG,
593 if (sm->wpa_auth->conf.wpa_strict_rekey && sm->has_GTK) {
594 wpa_auth_logger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
597 eloop_cancel_timeout(wpa_rekey_gtk, sm->wpa_auth, NULL);
598 eloop_register_timeout(0, 500000, wpa_rekey_gtk, sm->wpa_auth,
602 eloop_cancel_timeout(wpa_send_eapol_timeout, sm->wpa_auth, sm);
605 eloop_cancel_timeout(wpa_rekey_ptk, sm->wpa_auth, sm);
657 static int ft_check_msg_2_of_4(struct wpa_authenticator *wpa_auth,
683 os_memcmp(wpa_auth->conf.mobility_domain, mdie->mobility_domain,
706 static int wpa_receive_error_report(struct wpa_authenticator *wpa_auth,
710 wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_INFO,
715 if (group && wpa_auth->conf.wpa_group != WPA_CIPHER_TKIP) {
716 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_INFO,
720 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_INFO,
724 if (wpa_auth_mic_failure_report(wpa_auth, sm->addr) > 0)
727 wpa_auth->dot11RSNAStatsTKIPRemoteMICFailures++;
739 void wpa_receive(struct wpa_authenticator *wpa_auth,
754 if (wpa_auth == NULL || !wpa_auth->conf.wpa || sm == NULL)
841 wpa_auth_logger(wpa_auth, sm->addr,
851 wpa_auth_logger(wpa_auth, sm->addr,
864 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_WARNING,
888 wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_DEBUG,
902 wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_DEBUG,
906 wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_DEBUG,
929 wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_INFO,
950 wpa_sta_disconnect(wpa_auth, sm->addr);
955 wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_INFO,
973 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_INFO,
983 wpa_sta_disconnect(wpa_auth, sm->addr);
987 if (ft && ft_check_msg_2_of_4(wpa_auth, sm, &kde) < 0) {
988 wpa_sta_disconnect(wpa_auth, sm->addr);
996 wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_INFO,
1006 wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_INFO,
1017 if (!wpa_auth->conf.peerkey) {
1023 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_INFO,
1039 wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_DEBUG,
1043 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_INFO,
1049 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_INFO,
1057 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_INFO,
1062 eloop_cancel_timeout(wpa_send_eapol_timeout, wpa_auth, sm);
1072 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_INFO,
1085 wpa_smk_error(wpa_auth, sm, key);
1090 wpa_auth, sm,
1094 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_INFO,
1100 wpa_smk_m1(wpa_auth, sm, key);
1107 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_INFO,
1110 eloop_cancel_timeout(wpa_rekey_gtk, wpa_auth, NULL);
1111 wpa_rekey_gtk(wpa_auth, NULL);
1142 wpa_smk_m3(wpa_auth, sm, key);
1199 struct wpa_authenticator *wpa_auth = eloop_ctx;
1203 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_DEBUG, "EAPOL-Key timeout");
1209 void __wpa_send_eapol(struct wpa_authenticator *wpa_auth,
1262 hdr->version = wpa_auth->conf.eapol_version;
1276 alg = pairwise ? sm->pairwise : wpa_auth->conf.wpa_group;
1342 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_DEBUG,
1352 wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_inc_EapolFramesTx,
1354 wpa_auth_send_eapol(wpa_auth, sm->addr, (u8 *) hdr, len,
1360 static void wpa_send_eapol(struct wpa_authenticator *wpa_auth,
1373 __wpa_send_eapol(wpa_auth, sm, key_info, key_rsc, nonce, kde, kde_len,
1377 if (ctr == 1 && wpa_auth->conf.tx_status)
1387 wpa_send_eapol_timeout, wpa_auth, sm);
1420 wpa_auth_set_key(sm->wpa_auth, 0, WPA_ALG_NONE, sm->addr, 0, NULL, 0);
1422 eloop_cancel_timeout(wpa_rekey_ptk, sm->wpa_auth, sm);
1433 wpa_auth_vlogger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
1437 case WPA_AUTH:
1494 if (sm->mgmt_frame_prot && event == WPA_AUTH)
1529 wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portEnabled, 0);
1531 wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portValid, 0);
1534 wpa_auth_set_eapol(sm->wpa_auth, sm->addr,
1544 wpa_sta_disconnect(sm->wpa_auth, sm->addr);
1560 wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portControl_Auto,
1562 wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portEnabled, 1);
1567 static void wpa_group_ensure_init(struct wpa_authenticator *wpa_auth,
1590 wpa_group_init_gmk_and_counter(wpa_auth, group);
1591 wpa_gtk_update(wpa_auth, group);
1592 wpa_group_config_group_keys(wpa_auth, group);
1600 wpa_group_ensure_init(sm->wpa_auth, sm->group);
1640 } else if (wpa_auth_get_msk(sm->wpa_auth, sm->addr, msk, &len) == 0) {
1663 wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_keyRun, 0);
1671 psk = wpa_auth_get_psk(sm->wpa_auth, sm->addr, NULL);
1699 wpa_auth_logger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
1720 rsn_pmkid(sm->PMK, PMK_LEN, sm->wpa_auth->addr,
1725 wpa_send_eapol(sm->wpa_auth, sm,
1741 sm->wpa_auth->addr, sm->addr, sm->ANonce, sm->SNonce,
1764 pmk = wpa_auth_get_psk(sm->wpa_auth, sm->addr, pmk);
1783 wpa_auth_logger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
1796 wpa_auth_logger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
1810 eloop_cancel_timeout(wpa_send_eapol_timeout, sm->wpa_auth, sm);
1856 wpa_auth_get_seqnum(sm->wpa_auth, NULL, gsm->GN_igtk, igtk.pn) < 0)
1859 if (sm->wpa_auth->conf.disable_gtk) {
1911 wpa_auth_get_seqnum(sm->wpa_auth, NULL, gsm->GN, rsc);
1912 /* If FT is used, wpa_auth->wpa_ie includes both RSNIE and MDIE */
1913 wpa_ie = sm->wpa_auth->wpa_ie;
1914 wpa_ie_len = sm->wpa_auth->wpa_ie_len;
1916 (sm->wpa_auth->conf.wpa & WPA_PROTO_RSN) &&
1922 wpa_auth_logger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
1929 if (sm->wpa_auth->conf.disable_gtk) {
1957 wpa_auth_logger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
2006 conf = &sm->wpa_auth->conf;
2035 wpa_send_eapol(sm->wpa_auth, sm,
2051 if (wpa_auth_set_key(sm->wpa_auth, 0, alg, sm->addr, 0,
2053 wpa_sta_disconnect(sm->wpa_auth, sm->addr);
2059 if (sm->wpa_auth->conf.wpa_ptk_rekey) {
2060 eloop_cancel_timeout(wpa_rekey_ptk, sm->wpa_auth, sm);
2061 eloop_register_timeout(sm->wpa_auth->conf.
2063 sm->wpa_auth, sm);
2067 wpa_auth_set_eapol(sm->wpa_auth, sm->addr,
2075 wpa_auth_set_eapol(sm->wpa_auth, sm->addr,
2079 wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_portValid,
2082 wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_keyAvailable, 0);
2083 wpa_auth_set_eapol(sm->wpa_auth, sm->addr, WPA_EAPOL_keyDone, 1);
2088 wpa_auth_vlogger(sm->wpa_auth, sm->addr, LOGGER_INFO,
2093 wpa_ft_push_pmk_r1(sm->wpa_auth, sm->addr);
2100 struct wpa_authenticator *wpa_auth = sm->wpa_auth;
2106 wpa_auth_logger(wpa_auth, sm->addr, LOGGER_DEBUG,
2132 wpa_auth_get_eapol(sm->wpa_auth, sm->addr,
2140 if (wpa_auth_get_eapol(sm->wpa_auth, sm->addr,
2144 wpa_auth->dot11RSNA4WayHandshakeFailures++;
2145 wpa_auth_logger(sm->wpa_auth, sm->addr, LOGGER_INFO,
2151 if (wpa_auth_get_psk(sm->wpa_auth, sm->addr, NULL))
2154 wpa_auth_logger(sm->wpa_auth, sm->addr, LOGGER_INFO,
2156 wpa_auth->dot11RSNA4WayHandshakeFailures++;
2166 wpa_auth->dot11RSNA4WayHandshakeFailures++;
2167 wpa_auth_vlogger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
2194 wpa_auth->dot11RSNA4WayHandshakeFailures++;
2195 wpa_auth_vlogger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
2244 wpa_auth_get_seqnum(sm->wpa_auth, NULL, gsm->GN, rsc);
2245 wpa_auth_logger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
2249 if (sm->wpa_auth->conf.disable_gtk) {
2276 wpa_send_eapol(sm->wpa_auth, sm,
2295 wpa_auth_vlogger(sm->wpa_auth, sm->addr, LOGGER_INFO,
2343 static int wpa_gtk_update(struct wpa_authenticator *wpa_auth,
2351 wpa_auth->addr, group->GNonce,
2358 if (wpa_auth->conf.ieee80211w != NO_MGMT_FRAME_PROTECTION) {
2362 wpa_auth->addr, group->GNonce,
2375 static void wpa_group_gtk_init(struct wpa_authenticator *wpa_auth,
2392 wpa_gtk_update(wpa_auth, group);
2402 wpa_auth_logger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
2413 wpa_auth_logger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
2463 if (wpa_auth_get_seqnum(sm->wpa_auth, NULL, gsm->GN, pos) != 0)
2492 if (wpa_auth_get_seqnum(sm->wpa_auth, NULL, gsm->GN_igtk, pos) != 0)
2510 static void wpa_group_setkeys(struct wpa_authenticator *wpa_auth,
2531 wpa_gtk_update(wpa_auth, group);
2539 wpa_auth_for_each_sta(wpa_auth, wpa_group_update_sta, group);
2545 static int wpa_group_config_group_keys(struct wpa_authenticator *wpa_auth,
2550 if (wpa_auth_set_key(wpa_auth, group->vlan_id,
2551 wpa_cipher_to_alg(wpa_auth->conf.wpa_group),
2557 if (wpa_auth->conf.ieee80211w != NO_MGMT_FRAME_PROTECTION &&
2558 wpa_auth_set_key(wpa_auth, group->vlan_id, WPA_ALG_IGTK,
2569 static int wpa_group_setkeysdone(struct wpa_authenticator *wpa_auth,
2577 if (wpa_group_config_group_keys(wpa_auth, group) < 0)
2584 static void wpa_group_sm_step(struct wpa_authenticator *wpa_auth,
2588 wpa_group_gtk_init(wpa_auth, group);
2591 wpa_group_setkeysdone(wpa_auth, group);
2594 wpa_group_setkeys(wpa_auth, group);
2597 wpa_group_setkeysdone(wpa_auth, group);
2599 wpa_group_setkeys(wpa_auth, group);
2623 sm->wpa_auth->group->changed = FALSE;
2631 wpa_group_sm_step(sm->wpa_auth, sm->group);
2632 } while (sm->changed || sm->wpa_auth->group->changed);
2660 void wpa_gtk_rekey(struct wpa_authenticator *wpa_auth)
2665 if (wpa_auth == NULL)
2668 group = wpa_auth->group;
2679 wpa_gtk_update(wpa_auth, group);
2680 wpa_group_config_group_keys(wpa_auth, group);
2695 int wpa_get_mib(struct wpa_authenticator *wpa_auth, char *buf, size_t buflen)
2705 if (wpa_auth == NULL)
2714 wpa_bool_txt(wpa_auth->conf.wpa & WPA_PROTO_RSN),
2715 wpa_bool_txt(wpa_auth->conf.rsn_preauth));
2721 wpa_auth->dot11RSNAPMKIDUsed, PMKID_LEN);
2750 !!wpa_auth->conf.wpa_strict_rekey,
2753 wpa_cipher_key_len(wpa_auth->conf.wpa_group) * 8,
2757 RSN_SUITE_ARG(wpa_auth->dot11RSNAAuthenticationSuiteSelected),
2758 RSN_SUITE_ARG(wpa_auth->dot11RSNAPairwiseCipherSelected),
2759 RSN_SUITE_ARG(wpa_auth->dot11RSNAGroupCipherSelected),
2761 RSN_SUITE_ARG(wpa_auth->dot11RSNAAuthenticationSuiteRequested),
2762 RSN_SUITE_ARG(wpa_auth->dot11RSNAPairwiseCipherRequested),
2763 RSN_SUITE_ARG(wpa_auth->dot11RSNAGroupCipherRequested),
2764 wpa_auth->dot11RSNATKIPCounterMeasuresInvoked,
2765 wpa_auth->dot11RSNA4WayHandshakeFailures);
2775 wpa_auth->group->wpa_group_state);
2836 void wpa_auth_countermeasures_start(struct wpa_authenticator *wpa_auth)
2838 if (wpa_auth)
2839 wpa_auth->dot11RSNATKIPCounterMeasuresInvoked++;
2895 const u8 * wpa_auth_get_wpa_ie(struct wpa_authenticator *wpa_auth, size_t *len)
2897 if (wpa_auth == NULL)
2899 *len = wpa_auth->wpa_ie_len;
2900 return wpa_auth->wpa_ie;
2908 sm->wpa_auth->conf.disable_pmksa_caching)
2911 if (pmksa_cache_auth_add(sm->wpa_auth->pmksa, pmk, PMK_LEN,
2912 sm->wpa_auth->addr, sm->addr, session_timeout,
2920 int wpa_auth_pmksa_add_preauth(struct wpa_authenticator *wpa_auth,
2925 if (wpa_auth == NULL)
2928 if (pmksa_cache_auth_add(wpa_auth->pmksa, pmk, len, wpa_auth->addr,
2938 wpa_auth_add_group(struct wpa_authenticator *wpa_auth, int vlan_id)
2942 if (wpa_auth == NULL || wpa_auth->group == NULL)
2947 group = wpa_group_init(wpa_auth, vlan_id, 0);
2951 group->next = wpa_auth->group->next;
2952 wpa_auth->group->next = group;
2962 if (sm == NULL || sm->wpa_auth == NULL)
2965 group = sm->wpa_auth->group;
2973 group = wpa_auth_add_group(sm->wpa_auth, vlan_id);
2989 void wpa_auth_eapol_key_tx_status(struct wpa_authenticator *wpa_auth,
2992 if (wpa_auth == NULL || sm == NULL)
3011 eloop_cancel_timeout(wpa_send_eapol_timeout, wpa_auth, sm);
3014 wpa_send_eapol_timeout, wpa_auth, sm);