Lines Matching defs:query

147 static void hostapd_acl_query_free(struct hostapd_acl_query_data *query)
149 if (query == NULL)
151 os_free(query->auth_msg);
152 os_free(query);
158 struct hostapd_acl_query_data *query)
163 query->radius_id = radius_client_get_id(hapd->radius);
164 msg = radius_msg_new(RADIUS_CODE_ACCESS_REQUEST, query->radius_id);
268 struct hostapd_acl_query_data *query;
281 query = hapd->acl_queries;
282 while (query) {
283 if (os_memcmp(query->addr, addr, ETH_ALEN) == 0) {
284 /* pending query in RADIUS retransmit queue;
296 query = query->next;
302 /* No entry in the cache - query external RADIUS server */
303 query = os_zalloc(sizeof(*query));
304 if (query == NULL) {
305 wpa_printf(MSG_ERROR, "malloc for query data failed");
308 os_get_reltime(&query->timestamp);
309 os_memcpy(query->addr, addr, ETH_ALEN);
310 if (hostapd_radius_acl_query(hapd, addr, query)) {
312 "for ACL query.");
313 hostapd_acl_query_free(query);
317 query->auth_msg = os_malloc(len);
318 if (query->auth_msg == NULL) {
321 hostapd_acl_query_free(query);
324 os_memcpy(query->auth_msg, msg, len);
325 query->auth_msg_len = len;
326 query->next = hapd->acl_queries;
327 hapd->acl_queries = query;
381 wpa_printf(MSG_DEBUG, "ACL query for " MACSTR
469 * Returns: RADIUS_RX_PROCESSED if RADIUS message was a reply to ACL query (and
478 struct hostapd_acl_query_data *query, *prev;
482 query = hapd->acl_queries;
484 while (query) {
485 if (query->radius_id == hdr->identifier)
487 prev = query;
488 query = query->next;
490 if (query == NULL)
494 "message (id=%d)", query->radius_id);
505 "query", hdr->code);
516 os_memcpy(cache->addr, query->addr, sizeof(cache->addr));
534 MAC2STR(query->addr));
563 hostapd_logger(hapd, query->addr,
579 hostapd_drv_set_radius_acl_auth(hapd, query->addr, cache->accepted,
585 "successful RADIUS ACL query");
586 ieee802_11_mgmt(hapd, query->auth_msg, query->auth_msg_len, NULL);
592 hapd->acl_queries = query->next;
594 prev->next = query->next;
596 hostapd_acl_query_free(query);
626 struct hostapd_acl_query_data *query, *prev;
632 query = hapd->acl_queries;
633 while (query) {
634 prev = query;
635 query = query->next;