Lines Matching refs:query

126 static void hostapd_acl_query_free(struct hostapd_acl_query_data *query)
128 if (query == NULL)
130 os_free(query->auth_msg);
131 os_free(query);
137 struct hostapd_acl_query_data *query)
142 query->radius_id = radius_client_get_id(hapd->radius);
143 msg = radius_msg_new(RADIUS_CODE_ACCESS_REQUEST, query->radius_id);
250 struct hostapd_acl_query_data *query;
264 query = hapd->acl_queries;
265 while (query) {
266 if (os_memcmp(query->addr, addr, ETH_ALEN) == 0) {
267 /* pending query in RADIUS retransmit queue;
279 query = query->next;
285 /* No entry in the cache - query external RADIUS server */
286 query = os_zalloc(sizeof(*query));
287 if (query == NULL) {
288 wpa_printf(MSG_ERROR, "malloc for query data failed");
292 query->timestamp = t.sec;
293 os_memcpy(query->addr, addr, ETH_ALEN);
294 if (hostapd_radius_acl_query(hapd, addr, query)) {
296 "for ACL query.");
297 hostapd_acl_query_free(query);
301 query->auth_msg = os_malloc(len);
302 if (query->auth_msg == NULL) {
305 hostapd_acl_query_free(query);
308 os_memcpy(query->auth_msg, msg, len);
309 query->auth_msg_len = len;
310 query->next = hapd->acl_queries;
311 hapd->acl_queries = query;
362 wpa_printf(MSG_DEBUG, "ACL query for " MACSTR
406 * Returns: RADIUS_RX_PROCESSED if RADIUS message was a reply to ACL query (and
415 struct hostapd_acl_query_data *query, *prev;
420 query = hapd->acl_queries;
422 while (query) {
423 if (query->radius_id == hdr->identifier)
425 prev = query;
426 query = query->next;
428 if (query == NULL)
432 "message (id=%d)", query->radius_id);
443 "query", hdr->code);
455 os_memcpy(cache->addr, query->addr, sizeof(cache->addr));
475 MAC2STR(query->addr));
525 hostapd_drv_set_radius_acl_auth(hapd, query->addr, cache->accepted,
531 "successful RADIUS ACL query");
532 ieee802_11_mgmt(hapd, query->auth_msg, query->auth_msg_len, NULL);
538 hapd->acl_queries = query->next;
540 prev->next = query->next;
542 hostapd_acl_query_free(query);
574 struct hostapd_acl_query_data *query, *prev;
582 query = hapd->acl_queries;
583 while (query) {
584 prev = query;
585 query = query->next;