Lines Matching refs:query

103 static void hostapd_acl_query_free(struct hostapd_acl_query_data *query)  in hostapd_acl_query_free()  argument
105 if (!query) in hostapd_acl_query_free()
107 os_free(query->auth_msg); in hostapd_acl_query_free()
108 os_free(query->anonce); in hostapd_acl_query_free()
109 os_free(query->eapol); in hostapd_acl_query_free()
110 os_free(query); in hostapd_acl_query_free()
116 struct hostapd_acl_query_data *query) in hostapd_radius_acl_query() argument
121 query->radius_id = radius_client_get_id(hapd->radius); in hostapd_radius_acl_query()
122 msg = radius_msg_new(RADIUS_CODE_ACCESS_REQUEST, query->radius_id); in hostapd_radius_acl_query()
168 if (query->akm && in hostapd_radius_acl_query()
170 wpa_akm_to_suite(query->akm))) { in hostapd_radius_acl_query()
175 if (query->anonce && in hostapd_radius_acl_query()
179 query->anonce, WPA_NONCE_LEN)) { in hostapd_radius_acl_query()
184 if (query->eapol && in hostapd_radius_acl_query()
188 query->eapol, query->eapol_len)) { in hostapd_radius_acl_query()
266 struct hostapd_acl_query_data *query; in hostapd_allowed_address()
285 query = hapd->acl_queries; in hostapd_allowed_address()
286 while (query) { in hostapd_allowed_address()
287 if (ether_addr_equal(query->addr, addr)) { in hostapd_allowed_address()
292 query = query->next; in hostapd_allowed_address()
299 query = os_zalloc(sizeof(*query)); in hostapd_allowed_address()
300 if (!query) { in hostapd_allowed_address()
304 os_get_reltime(&query->timestamp); in hostapd_allowed_address()
305 os_memcpy(query->addr, addr, ETH_ALEN); in hostapd_allowed_address()
306 if (hostapd_radius_acl_query(hapd, addr, query)) { in hostapd_allowed_address()
309 hostapd_acl_query_free(query); in hostapd_allowed_address()
313 query->auth_msg = os_memdup(msg, len); in hostapd_allowed_address()
314 if (!query->auth_msg) { in hostapd_allowed_address()
317 hostapd_acl_query_free(query); in hostapd_allowed_address()
320 query->auth_msg_len = len; in hostapd_allowed_address()
321 query->next = hapd->acl_queries; in hostapd_allowed_address()
322 hapd->acl_queries = query; in hostapd_allowed_address()
491 struct hostapd_acl_query_data *query, *prev; in hostapd_acl_recv_radius() local
496 query = hapd->acl_queries; in hostapd_acl_recv_radius()
498 while (query) { in hostapd_acl_recv_radius()
499 if (query->radius_id == hdr->identifier) in hostapd_acl_recv_radius()
501 prev = query; in hostapd_acl_recv_radius()
502 query = query->next; in hostapd_acl_recv_radius()
504 if (!query) in hostapd_acl_recv_radius()
509 query->radius_id); in hostapd_acl_recv_radius()
534 os_memcpy(cache->addr, query->addr, sizeof(cache->addr)); in hostapd_acl_recv_radius()
554 MAC2STR(query->addr)); in hostapd_acl_recv_radius()
586 hostapd_logger(hapd, query->addr, in hostapd_acl_recv_radius()
602 if (query->radius_psk) { in hostapd_acl_recv_radius()
607 sta = ap_get_sta(hapd, query->addr); in hostapd_acl_recv_radius()
623 hostapd_drv_set_radius_acl_auth(hapd, query->addr, in hostapd_acl_recv_radius()
632 ieee802_11_mgmt(hapd, query->auth_msg, query->auth_msg_len, in hostapd_acl_recv_radius()
640 hapd->acl_queries = query->next; in hostapd_acl_recv_radius()
642 prev->next = query->next; in hostapd_acl_recv_radius()
644 hostapd_acl_query_free(query); in hostapd_acl_recv_radius()
674 struct hostapd_acl_query_data *query, *prev; in hostapd_acl_deinit() local
681 query = hapd->acl_queries; in hostapd_acl_deinit()
683 while (query) { in hostapd_acl_deinit()
684 prev = query; in hostapd_acl_deinit()
685 query = query->next; in hostapd_acl_deinit()
725 struct hostapd_acl_query_data *query; in hostapd_acl_req_radius_psk() local
727 query = os_zalloc(sizeof(*query)); in hostapd_acl_req_radius_psk()
728 if (!query) in hostapd_acl_req_radius_psk()
731 query->radius_psk = true; in hostapd_acl_req_radius_psk()
732 query->akm = key_mgmt; in hostapd_acl_req_radius_psk()
733 os_get_reltime(&query->timestamp); in hostapd_acl_req_radius_psk()
734 os_memcpy(query->addr, addr, ETH_ALEN); in hostapd_acl_req_radius_psk()
736 query->anonce = os_memdup(anonce, WPA_NONCE_LEN); in hostapd_acl_req_radius_psk()
738 query->eapol = os_memdup(eapol, eapol_len); in hostapd_acl_req_radius_psk()
739 query->eapol_len = eapol_len; in hostapd_acl_req_radius_psk()
741 if (hostapd_radius_acl_query(hapd, addr, query)) { in hostapd_acl_req_radius_psk()
744 hostapd_acl_query_free(query); in hostapd_acl_req_radius_psk()
748 query->next = hapd->acl_queries; in hostapd_acl_req_radius_psk()
749 hapd->acl_queries = query; in hostapd_acl_req_radius_psk()