Lines Matching refs:hapd
40 static void ieee802_1x_finished(struct hostapd_data *hapd,
45 static void ieee802_1x_send(struct hostapd_data *hapd, struct sta_info *sta, in ieee802_1x_send() argument
63 xhdr->version = hapd->conf->eapol_version; in ieee802_1x_send()
73 if (hapd->ext_eapol_frame_io) { in ieee802_1x_send()
79 wpa_msg(hapd->msg_ctx, MSG_INFO, in ieee802_1x_send()
87 rsn_preauth_send(hapd, sta, buf, len); in ieee802_1x_send()
90 hapd, sta->addr, buf, len, in ieee802_1x_send()
98 void ieee802_1x_set_sta_authorized(struct hostapd_data *hapd, in ieee802_1x_set_sta_authorized() argument
107 ap_sta_set_authorized(hapd, sta, 1); in ieee802_1x_set_sta_authorized()
108 res = hostapd_set_authorized(hapd, sta, 1); in ieee802_1x_set_sta_authorized()
109 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_set_sta_authorized()
112 ap_sta_set_authorized(hapd, sta, 0); in ieee802_1x_set_sta_authorized()
113 res = hostapd_set_authorized(hapd, sta, 0); in ieee802_1x_set_sta_authorized()
114 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_set_sta_authorized()
126 accounting_sta_start(hapd, sta); in ieee802_1x_set_sta_authorized()
134 static void ieee802_1x_tx_key_one(struct hostapd_data *hapd, in ieee802_1x_tx_key_one() argument
166 if (hapd->conf->eapol_key_index_workaround) { in ieee802_1x_tx_key_one()
197 hdr->version = hapd->conf->eapol_version; in ieee802_1x_tx_key_one()
206 ieee802_1x_send(hapd, sta, IEEE802_1X_TYPE_EAPOL_KEY, (u8 *) key, len); in ieee802_1x_tx_key_one()
213 static void ieee802_1x_tx_key(struct hostapd_data *hapd, struct sta_info *sta) in ieee802_1x_tx_key() argument
215 struct eapol_authenticator *eapol = hapd->eapol_auth; in ieee802_1x_tx_key()
232 ieee802_1x_tx_key_one(hapd, sta, eapol->default_wep_key_idx, 1, in ieee802_1x_tx_key()
234 hapd->conf->default_wep_key_len); in ieee802_1x_tx_key()
237 if (hapd->conf->individual_wep_key_len > 0) { in ieee802_1x_tx_key()
239 ikey = os_malloc(hapd->conf->individual_wep_key_len); in ieee802_1x_tx_key()
241 random_get_bytes(ikey, hapd->conf->individual_wep_key_len)) in ieee802_1x_tx_key()
250 ikey, hapd->conf->individual_wep_key_len); in ieee802_1x_tx_key()
252 ieee802_1x_tx_key_one(hapd, sta, 0, 0, ikey, in ieee802_1x_tx_key()
253 hapd->conf->individual_wep_key_len); in ieee802_1x_tx_key()
257 if (hostapd_drv_set_key(hapd->conf->iface, hapd, WPA_ALG_WEP, in ieee802_1x_tx_key()
259 hapd->conf->individual_wep_key_len)) { in ieee802_1x_tx_key()
272 const char *radius_mode_txt(struct hostapd_data *hapd) in radius_mode_txt() argument
274 switch (hapd->iface->conf->hw_mode) { in radius_mode_txt()
288 int radius_sta_rate(struct hostapd_data *hapd, struct sta_info *sta) in radius_sta_rate() argument
302 static void ieee802_1x_learn_identity(struct hostapd_data *hapd, in ieee802_1x_learn_identity() argument
332 hostapd_logger(hapd, sm->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_learn_identity()
338 static int add_common_radius_sta_attr_rsn(struct hostapd_data *hapd, in add_common_radius_sta_attr_rsn() argument
358 suite = wpa_cipher_to_suite(((hapd->conf->wpa & 0x2) || in add_common_radius_sta_attr_rsn()
359 hapd->conf->osen) ? in add_common_radius_sta_attr_rsn()
361 hapd->conf->wpa_group); in add_common_radius_sta_attr_rsn()
382 if (hapd->conf->ieee80211w != NO_MGMT_FRAME_PROTECTION) { in add_common_radius_sta_attr_rsn()
384 hapd->conf->group_mgmt_cipher); in add_common_radius_sta_attr_rsn()
400 static int add_common_radius_sta_attr(struct hostapd_data *hapd, in add_common_radius_sta_attr() argument
436 radius_sta_rate(hapd, sta) / 2, in add_common_radius_sta_attr()
437 (radius_sta_rate(hapd, sta) & 1) ? ".5" : "", in add_common_radius_sta_attr()
438 radius_mode_txt(hapd)); in add_common_radius_sta_attr()
459 if ((hapd->conf->wpa & 2) && in add_common_radius_sta_attr()
460 !hapd->conf->disable_pmksa_caching && in add_common_radius_sta_attr()
475 if (hapd->conf->wpa && wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt) && in add_common_radius_sta_attr()
483 hapd->conf->mobility_domain))) { in add_common_radius_sta_attr()
489 if ((hapd->conf->wpa || hapd->conf->osen) && sta->wpa_sm && in add_common_radius_sta_attr()
490 add_common_radius_sta_attr_rsn(hapd, req_attr, sta, msg) < 0) in add_common_radius_sta_attr()
497 int add_common_radius_attr(struct hostapd_data *hapd, in add_common_radius_attr() argument
508 hapd->conf->own_ip_addr.af == AF_INET && in add_common_radius_attr()
510 (u8 *) &hapd->conf->own_ip_addr.u.v4, 4)) { in add_common_radius_attr()
518 hapd->conf->own_ip_addr.af == AF_INET6 && in add_common_radius_attr()
520 (u8 *) &hapd->conf->own_ip_addr.u.v6, 16)) { in add_common_radius_attr()
528 hapd->conf->nas_identifier && in add_common_radius_attr()
530 (u8 *) hapd->conf->nas_identifier, in add_common_radius_attr()
531 os_strlen(hapd->conf->nas_identifier))) { in add_common_radius_attr()
537 MAC2STR(hapd->own_addr)); in add_common_radius_attr()
538 os_memcpy(&buf[len], hapd->conf->ssid.ssid, in add_common_radius_attr()
539 hapd->conf->ssid.ssid_len); in add_common_radius_attr()
540 len += hapd->conf->ssid.ssid_len; in add_common_radius_attr()
558 if (hapd->conf->interworking && in add_common_radius_attr()
559 !is_zero_ether_addr(hapd->conf->hessid)) { in add_common_radius_attr()
561 MAC2STR(hapd->conf->hessid)); in add_common_radius_attr()
573 if (sta && add_common_radius_sta_attr(hapd, req_attr, sta, msg) < 0) in add_common_radius_attr()
590 static void ieee802_1x_encapsulate_radius(struct hostapd_data *hapd, in ieee802_1x_encapsulate_radius() argument
600 ieee802_1x_learn_identity(hapd, sm, eap, len); in ieee802_1x_encapsulate_radius()
605 sm->radius_identifier = radius_client_get_id(hapd->radius); in ieee802_1x_encapsulate_radius()
625 if (add_common_radius_attr(hapd, hapd->conf->radius_auth_req_attr, sta, in ieee802_1x_encapsulate_radius()
632 if (!hostapd_config_get_radius_attr(hapd->conf->radius_auth_req_attr, in ieee802_1x_encapsulate_radius()
660 if (hapd->conf->radius_request_cui) { in ieee802_1x_encapsulate_radius()
680 if (hapd->conf->hs20) { in ieee802_1x_encapsulate_radius()
714 if (radius_client_send(hapd->radius, msg, RADIUS_AUTH, sta->addr) < 0) in ieee802_1x_encapsulate_radius()
725 static void handle_eap_response(struct hostapd_data *hapd, in handle_eap_response() argument
743 hostapd_logger(hapd, sm->addr, HOSTAPD_MODULE_IEEE8021X, in handle_eap_response()
757 static void handle_eap_initiate(struct hostapd_data *hapd, in handle_eap_initiate() argument
777 hostapd_logger(hapd, sm->addr, HOSTAPD_MODULE_IEEE8021X, in handle_eap_initiate()
791 static void handle_eap(struct hostapd_data *hapd, struct sta_info *sta, in handle_eap() argument
825 handle_eap_response(hapd, sta, eap, eap_len); in handle_eap()
835 handle_eap_initiate(hapd, sta, eap, eap_len); in handle_eap()
848 ieee802_1x_alloc_eapol_sm(struct hostapd_data *hapd, struct sta_info *sta) in ieee802_1x_alloc_eapol_sm() argument
858 return eapol_auth_alloc(hapd->eapol_auth, sta->addr, flags, in ieee802_1x_alloc_eapol_sm()
896 void ieee802_1x_receive(struct hostapd_data *hapd, const u8 *sa, const u8 *buf, in ieee802_1x_receive() argument
906 if (!hapd->conf->ieee802_1x && !hapd->conf->wpa && !hapd->conf->osen && in ieee802_1x_receive()
907 !hapd->conf->wps_state) in ieee802_1x_receive()
912 sta = ap_get_sta(hapd, sa); in ieee802_1x_receive()
914 !(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_WIRED))) { in ieee802_1x_receive()
959 wpa_receive(hapd->wpa_auth, sta->wpa_sm, (u8 *) hdr, in ieee802_1x_receive()
964 if (!hapd->conf->ieee802_1x && !hapd->conf->osen && in ieee802_1x_receive()
979 sta->eapol_sm = ieee802_1x_alloc_eapol_sm(hapd, sta); in ieee802_1x_receive()
984 if (!hapd->conf->ieee802_1x && hapd->conf->wps_state) { in ieee802_1x_receive()
1017 handle_eap(hapd, sta, (u8 *) (hdr + 1), datalen); in ieee802_1x_receive()
1021 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_receive()
1027 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_WPA, in ieee802_1x_receive()
1040 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_receive()
1045 accounting_sta_stop(hapd, sta); in ieee802_1x_receive()
1083 void ieee802_1x_new_station(struct hostapd_data *hapd, struct sta_info *sta) in ieee802_1x_new_station() argument
1091 if (hapd->conf->wps_state && in ieee802_1x_new_station()
1092 ((hapd->conf->wpa && (sta->flags & WLAN_STA_MAYBE_WPS)) || in ieee802_1x_new_station()
1103 if (!force_1x && !hapd->conf->ieee802_1x && !hapd->conf->osen) { in ieee802_1x_new_station()
1110 ieee802_1x_free_station(hapd, sta); in ieee802_1x_new_station()
1121 ieee802_1x_free_station(hapd, sta); in ieee802_1x_new_station()
1126 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_new_station()
1128 sta->eapol_sm = ieee802_1x_alloc_eapol_sm(hapd, sta); in ieee802_1x_new_station()
1130 hostapd_logger(hapd, sta->addr, in ieee802_1x_new_station()
1141 if (!hapd->conf->ieee802_1x && hapd->conf->wps_state && in ieee802_1x_new_station()
1158 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_new_station()
1179 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_new_station()
1192 pmksa_cache_to_eapol_data(hapd, pmksa, sta->eapol_sm); in ieee802_1x_new_station()
1193 ap_sta_bind_vlan(hapd, sta); in ieee802_1x_new_station()
1208 void ieee802_1x_free_station(struct hostapd_data *hapd, struct sta_info *sta) in ieee802_1x_free_station() argument
1213 eloop_cancel_timeout(ieee802_1x_wnm_notif_send, hapd, sta); in ieee802_1x_free_station()
1237 static void ieee802_1x_decapsulate_radius(struct hostapd_data *hapd, in ieee802_1x_decapsulate_radius() argument
1260 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_decapsulate_radius()
1268 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_decapsulate_radius()
1302 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_decapsulate_radius()
1314 static void ieee802_1x_get_keys(struct hostapd_data *hapd, in ieee802_1x_get_keys() argument
1360 static void ieee802_1x_store_radius_class(struct hostapd_data *hapd, in ieee802_1x_store_radius_class() argument
1371 if (!hapd->conf->radius->acct_server || hapd->radius == NULL || in ieee802_1x_store_radius_class()
1416 static void ieee802_1x_update_sta_identity(struct hostapd_data *hapd, in ieee802_1x_update_sta_identity() argument
1435 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_update_sta_identity()
1448 static void ieee802_1x_update_sta_cui(struct hostapd_data *hapd, in ieee802_1x_update_sta_cui() argument
1499 static void ieee802_1x_hs20_deauth_req(struct hostapd_data *hapd, in ieee802_1x_hs20_deauth_req() argument
1516 ap_sta_session_timeout(hapd, sta, hapd->conf->hs20_deauth_req_timeout); in ieee802_1x_hs20_deauth_req()
1520 static void ieee802_1x_hs20_session_info(struct hostapd_data *hapd, in ieee802_1x_hs20_session_info() argument
1551 beacon_int = hapd->iconf->beacon_int; in ieee802_1x_hs20_session_info()
1558 ap_sta_session_warning_timeout(hapd, sta, warning_time); in ieee802_1x_hs20_session_info()
1564 static void ieee802_1x_check_hs20(struct hostapd_data *hapd, in ieee802_1x_check_hs20() argument
1602 ieee802_1x_hs20_deauth_req(hapd, sta, pos, sublen); in ieee802_1x_check_hs20()
1605 ieee802_1x_hs20_session_info(hapd, sta, pos, sublen, in ieee802_1x_check_hs20()
1620 static int ieee802_1x_select_radius_identifier(struct hostapd_data *hapd, in ieee802_1x_select_radius_identifier() argument
1637 ieee802_1x_search_radius_identifier(struct hostapd_data *hapd, u8 identifier) in ieee802_1x_search_radius_identifier() argument
1642 ap_for_each_sta(hapd, ieee802_1x_select_radius_identifier, &id_search); in ieee802_1x_search_radius_identifier()
1661 struct hostapd_data *hapd = data; in ieee802_1x_receive_auth() local
1675 sm = ieee802_1x_search_radius_identifier(hapd, hdr->identifier); in ieee802_1x_receive_auth()
1719 if (hapd->conf->acct_interim_interval == 0 && in ieee802_1x_receive_auth()
1724 hostapd_logger(hapd, sta->addr, in ieee802_1x_receive_auth()
1738 if (hapd->conf->ssid.dynamic_vlan != DYNAMIC_VLAN_DISABLED) { in ieee802_1x_receive_auth()
1748 !hostapd_vlan_valid(hapd->conf->vlan, &vlan_desc)) { in ieee802_1x_receive_auth()
1750 hostapd_logger(hapd, sta->addr, in ieee802_1x_receive_auth()
1757 ap_sta_set_vlan(hapd, sta, &vlan_desc); in ieee802_1x_receive_auth()
1761 if (hapd->conf->ssid.dynamic_vlan == DYNAMIC_VLAN_REQUIRED && in ieee802_1x_receive_auth()
1764 hostapd_logger(hapd, sta->addr, in ieee802_1x_receive_auth()
1773 if (ap_sta_set_vlan(hapd, sta, &vlan_desc) < 0) in ieee802_1x_receive_auth()
1778 hostapd_logger(hapd, sta->addr, in ieee802_1x_receive_auth()
1786 ap_sta_bind_vlan(hapd, sta) < 0) in ieee802_1x_receive_auth()
1797 ap_sta_session_timeout(hapd, sta, session_timeout); in ieee802_1x_receive_auth()
1801 ieee802_1x_get_keys(hapd, sta, msg, req, shared_secret, in ieee802_1x_receive_auth()
1803 ieee802_1x_store_radius_class(hapd, sta, msg); in ieee802_1x_receive_auth()
1804 ieee802_1x_update_sta_identity(hapd, sta, msg); in ieee802_1x_receive_auth()
1805 ieee802_1x_update_sta_cui(hapd, sta, msg); in ieee802_1x_receive_auth()
1806 ieee802_1x_check_hs20(hapd, sta, msg, in ieee802_1x_receive_auth()
1819 hostapd_logger(hapd, sm->addr, in ieee802_1x_receive_auth()
1835 ieee802_1x_decapsulate_radius(hapd, sta); in ieee802_1x_receive_auth()
1846 void ieee802_1x_abort_auth(struct hostapd_data *hapd, struct sta_info *sta) in ieee802_1x_abort_auth() argument
1852 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_abort_auth()
1866 wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "EAP Timeout, STA " MACSTR, in ieee802_1x_abort_auth()
1870 ap_sta_disconnect(hapd, sta, sta->addr, in ieee802_1x_abort_auth()
1876 static int ieee802_1x_rekey_broadcast(struct hostapd_data *hapd) in ieee802_1x_rekey_broadcast() argument
1878 struct eapol_authenticator *eapol = hapd->eapol_auth; in ieee802_1x_rekey_broadcast()
1880 if (hapd->conf->default_wep_key_len < 1) in ieee802_1x_rekey_broadcast()
1884 eapol->default_wep_key = os_malloc(hapd->conf->default_wep_key_len); in ieee802_1x_rekey_broadcast()
1887 hapd->conf->default_wep_key_len)) { in ieee802_1x_rekey_broadcast()
1896 hapd->conf->default_wep_key_len); in ieee802_1x_rekey_broadcast()
1902 static int ieee802_1x_sta_key_available(struct hostapd_data *hapd, in ieee802_1x_sta_key_available() argument
1915 struct hostapd_data *hapd = eloop_ctx; in ieee802_1x_rekey() local
1916 struct eapol_authenticator *eapol = hapd->eapol_auth; in ieee802_1x_rekey()
1920 hapd->conf->individual_wep_key_len > 0 ? 1 : 0; in ieee802_1x_rekey()
1927 if (ieee802_1x_rekey_broadcast(hapd)) { in ieee802_1x_rekey()
1928 hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_rekey()
1938 if (hostapd_drv_set_key(hapd->conf->iface, hapd, WPA_ALG_WEP, in ieee802_1x_rekey()
1942 hapd->conf->default_wep_key_len)) { in ieee802_1x_rekey()
1943 hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_rekey()
1951 ap_for_each_sta(hapd, ieee802_1x_sta_key_available, NULL); in ieee802_1x_rekey()
1953 if (hapd->conf->wep_rekeying_period > 0) { in ieee802_1x_rekey()
1954 eloop_register_timeout(hapd->conf->wep_rekeying_period, 0, in ieee802_1x_rekey()
1955 ieee802_1x_rekey, hapd, NULL); in ieee802_1x_rekey()
1995 struct hostapd_data *hapd = ctx; in ieee802_1x_aaa_send() local
1998 ieee802_1x_encapsulate_radius(hapd, sta, data, datalen); in ieee802_1x_aaa_send()
2006 struct hostapd_data *hapd = ctx; in _ieee802_1x_finished() local
2009 rsn_preauth_finished(hapd, sta, success); in _ieee802_1x_finished()
2011 ieee802_1x_finished(hapd, sta, success, remediation); in _ieee802_1x_finished()
2019 struct hostapd_data *hapd = ctx; in ieee802_1x_get_eap_user() local
2024 eap_user = hostapd_get_eap_user(hapd, identity, identity_len, phase2); in ieee802_1x_get_eap_user()
2060 struct hostapd_data *hapd = ctx; in ieee802_1x_sta_entry_alive() local
2062 sta = ap_get_sta(hapd, addr); in ieee802_1x_sta_entry_alive()
2073 struct hostapd_data *hapd = ctx; in ieee802_1x_logger() local
2089 hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE8021X, hlevel, "%s", in ieee802_1x_logger()
2098 struct hostapd_data *hapd = ctx; in ieee802_1x_set_port_authorized() local
2100 ieee802_1x_set_sta_authorized(hapd, sta, authorized); in ieee802_1x_set_port_authorized()
2106 struct hostapd_data *hapd = ctx; in _ieee802_1x_abort_auth() local
2108 ieee802_1x_abort_auth(hapd, sta); in _ieee802_1x_abort_auth()
2116 struct hostapd_data *hapd = ctx; in _ieee802_1x_tx_key() local
2118 ieee802_1x_tx_key(hapd, sta); in _ieee802_1x_tx_key()
2145 struct hostapd_data *hapd = ctx; in ieee802_1x_erp_get_key() local
2148 dl_list_for_each(erp, &hapd->erp_keys, struct eap_server_erp_key, in ieee802_1x_erp_get_key()
2160 struct hostapd_data *hapd = ctx; in ieee802_1x_erp_add_key() local
2162 dl_list_add(&hapd->erp_keys, &erp->list); in ieee802_1x_erp_add_key()
2169 int ieee802_1x_init(struct hostapd_data *hapd) in ieee802_1x_init() argument
2175 dl_list_init(&hapd->erp_keys); in ieee802_1x_init()
2178 conf.ctx = hapd; in ieee802_1x_init()
2179 conf.eap_reauth_period = hapd->conf->eap_reauth_period; in ieee802_1x_init()
2180 conf.wpa = hapd->conf->wpa; in ieee802_1x_init()
2181 conf.individual_wep_key_len = hapd->conf->individual_wep_key_len; in ieee802_1x_init()
2182 conf.eap_server = hapd->conf->eap_server; in ieee802_1x_init()
2183 conf.ssl_ctx = hapd->ssl_ctx; in ieee802_1x_init()
2184 conf.msg_ctx = hapd->msg_ctx; in ieee802_1x_init()
2185 conf.eap_sim_db_priv = hapd->eap_sim_db_priv; in ieee802_1x_init()
2186 conf.eap_req_id_text = hapd->conf->eap_req_id_text; in ieee802_1x_init()
2187 conf.eap_req_id_text_len = hapd->conf->eap_req_id_text_len; in ieee802_1x_init()
2188 conf.erp_send_reauth_start = hapd->conf->erp_send_reauth_start; in ieee802_1x_init()
2189 conf.erp_domain = hapd->conf->erp_domain; in ieee802_1x_init()
2190 conf.erp = hapd->conf->eap_server_erp; in ieee802_1x_init()
2191 conf.tls_session_lifetime = hapd->conf->tls_session_lifetime; in ieee802_1x_init()
2192 conf.pac_opaque_encr_key = hapd->conf->pac_opaque_encr_key; in ieee802_1x_init()
2193 conf.eap_fast_a_id = hapd->conf->eap_fast_a_id; in ieee802_1x_init()
2194 conf.eap_fast_a_id_len = hapd->conf->eap_fast_a_id_len; in ieee802_1x_init()
2195 conf.eap_fast_a_id_info = hapd->conf->eap_fast_a_id_info; in ieee802_1x_init()
2196 conf.eap_fast_prov = hapd->conf->eap_fast_prov; in ieee802_1x_init()
2197 conf.pac_key_lifetime = hapd->conf->pac_key_lifetime; in ieee802_1x_init()
2198 conf.pac_key_refresh_time = hapd->conf->pac_key_refresh_time; in ieee802_1x_init()
2199 conf.eap_sim_aka_result_ind = hapd->conf->eap_sim_aka_result_ind; in ieee802_1x_init()
2200 conf.tnc = hapd->conf->tnc; in ieee802_1x_init()
2201 conf.wps = hapd->wps; in ieee802_1x_init()
2202 conf.fragment_size = hapd->conf->fragment_size; in ieee802_1x_init()
2203 conf.pwd_group = hapd->conf->pwd_group; in ieee802_1x_init()
2204 conf.pbc_in_m1 = hapd->conf->pbc_in_m1; in ieee802_1x_init()
2205 if (hapd->conf->server_id) { in ieee802_1x_init()
2206 conf.server_id = (const u8 *) hapd->conf->server_id; in ieee802_1x_init()
2207 conf.server_id_len = os_strlen(hapd->conf->server_id); in ieee802_1x_init()
2229 hapd->eapol_auth = eapol_auth_init(&conf, &cb); in ieee802_1x_init()
2230 if (hapd->eapol_auth == NULL) in ieee802_1x_init()
2233 if ((hapd->conf->ieee802_1x || hapd->conf->wpa) && in ieee802_1x_init()
2234 hostapd_set_drv_ieee8021x(hapd, hapd->conf->iface, 1)) in ieee802_1x_init()
2238 if (radius_client_register(hapd->radius, RADIUS_AUTH, in ieee802_1x_init()
2239 ieee802_1x_receive_auth, hapd)) in ieee802_1x_init()
2243 if (hapd->conf->default_wep_key_len) { in ieee802_1x_init()
2245 hostapd_drv_set_key(hapd->conf->iface, hapd, in ieee802_1x_init()
2249 ieee802_1x_rekey(hapd, NULL); in ieee802_1x_init()
2251 if (hapd->eapol_auth->default_wep_key == NULL) in ieee802_1x_init()
2259 void ieee802_1x_erp_flush(struct hostapd_data *hapd) in ieee802_1x_erp_flush() argument
2263 while ((erp = dl_list_first(&hapd->erp_keys, struct eap_server_erp_key, in ieee802_1x_erp_flush()
2271 void ieee802_1x_deinit(struct hostapd_data *hapd) in ieee802_1x_deinit() argument
2273 eloop_cancel_timeout(ieee802_1x_rekey, hapd, NULL); in ieee802_1x_deinit()
2275 if (hapd->driver && hapd->drv_priv && in ieee802_1x_deinit()
2276 (hapd->conf->ieee802_1x || hapd->conf->wpa)) in ieee802_1x_deinit()
2277 hostapd_set_drv_ieee8021x(hapd, hapd->conf->iface, 0); in ieee802_1x_deinit()
2279 eapol_auth_deinit(hapd->eapol_auth); in ieee802_1x_deinit()
2280 hapd->eapol_auth = NULL; in ieee802_1x_deinit()
2282 ieee802_1x_erp_flush(hapd); in ieee802_1x_deinit()
2286 int ieee802_1x_tx_status(struct hostapd_data *hapd, struct sta_info *sta, in ieee802_1x_tx_status() argument
2308 return ieee802_1x_eapol_tx_status(hapd, sta, pos, buf + len - pos, in ieee802_1x_tx_status()
2313 int ieee802_1x_eapol_tx_status(struct hostapd_data *hapd, struct sta_info *sta, in ieee802_1x_eapol_tx_status() argument
2336 wpa_auth_eapol_key_tx_status(hapd->wpa_auth, in ieee802_1x_eapol_tx_status()
2347 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, in ieee802_1x_eapol_tx_status()
2445 int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen) in ieee802_1x_get_mib() argument
2452 int ieee802_1x_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta, in ieee802_1x_get_mib_sta() argument
2623 struct hostapd_data *hapd = eloop_ctx; in ieee802_1x_wnm_notif_send() local
2630 hs20_send_wnm_notification(hapd, sta->addr, in ieee802_1x_wnm_notif_send()
2641 hs20_send_wnm_notification_deauth_req(hapd, sta->addr, in ieee802_1x_wnm_notif_send()
2648 static void ieee802_1x_finished(struct hostapd_data *hapd, in ieee802_1x_finished() argument
2663 os_strdup(hapd->conf->subscr_remediation_url); in ieee802_1x_finished()
2670 eloop_cancel_timeout(ieee802_1x_wnm_notif_send, hapd, sta); in ieee802_1x_finished()
2672 hapd, sta); in ieee802_1x_finished()
2685 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_WPA, in ieee802_1x_finished()
2701 wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "IEEE 802.1X: Force " in ieee802_1x_finished()
2708 ap_sta_disconnect(hapd, sta, sta->addr, in ieee802_1x_finished()
2710 hostapd_wps_eap_completed(hapd); in ieee802_1x_finished()