Lines Matching refs:entry
31 * Maximum number of retransmit attempts before the entry is removed from
322 struct radius_msg_list *entry,
329 if (entry->msg_type == RADIUS_ACCT ||
330 entry->msg_type == RADIUS_ACCT_INTERIM) {
332 if (entry->attempts == 0)
340 if (entry->attempts == 0)
348 /* retransmit; remove entry if too many attempts */
349 entry->attempts++;
350 hostapd_logger(radius->ctx, entry->addr, HOSTAPD_MODULE_RADIUS,
352 radius_msg_get_hdr(entry->msg)->identifier);
354 os_get_time(&entry->last_attempt);
355 buf = radius_msg_get_buf(entry->msg);
357 radius_client_handle_send_error(radius, s, entry->msg_type);
359 entry->next_try = now + entry->next_wait;
360 entry->next_wait *= 2;
361 if (entry->next_wait > RADIUS_CLIENT_MAX_WAIT)
362 entry->next_wait = RADIUS_CLIENT_MAX_WAIT;
363 if (entry->attempts >= RADIUS_CLIENT_MAX_RETRIES) {
379 struct radius_msg_list *entry, *prev, *tmp;
383 entry = radius->msgs;
384 if (!entry)
391 while (entry) {
392 if (now.sec >= entry->next_try &&
393 radius_client_retransmit(radius, entry, now.sec)) {
395 prev->next = entry->next;
397 radius->msgs = entry->next;
399 tmp = entry;
400 entry = entry->next;
406 if (entry->attempts > RADIUS_CLIENT_NUM_FAILOVER) {
407 if (entry->msg_type == RADIUS_ACCT ||
408 entry->msg_type == RADIUS_ACCT_INTERIM)
414 if (first == 0 || entry->next_try < first)
415 first = entry->next_try;
417 prev = entry;
418 entry = entry->next;
442 for (entry = radius->msgs; entry; entry = entry->next) {
443 if (entry->msg_type == RADIUS_AUTH)
466 for (entry = radius->msgs; entry; entry = entry->next) {
467 if (entry->msg_type == RADIUS_ACCT ||
468 entry->msg_type == RADIUS_ACCT_INTERIM)
487 struct radius_msg_list *entry;
496 for (entry = radius->msgs; entry; entry = entry->next) {
497 if (first == 0 || entry->next_try < first)
498 first = entry->next_try;
518 struct radius_msg_list *entry, *prev;
527 entry = os_zalloc(sizeof(*entry));
528 if (entry == NULL) {
535 os_memcpy(entry->addr, addr, ETH_ALEN);
536 entry->msg = msg;
537 entry->msg_type = msg_type;
538 entry->shared_secret = shared_secret;
539 entry->shared_secret_len = shared_secret_len;
540 os_get_time(&entry->last_attempt);
541 entry->first_try = entry->last_attempt.sec;
542 entry->next_try = entry->first_try + RADIUS_CLIENT_FIRST_WAIT;
543 entry->attempts = 1;
544 entry->next_wait = RADIUS_CLIENT_FIRST_WAIT * 2;
545 entry->next = radius->msgs;
546 radius->msgs = entry;
553 while (entry->next) {
554 prev = entry;
555 entry = entry->next;
559 radius_client_msg_free(entry);
569 struct radius_msg_list *entry, *prev, *tmp;
574 entry = radius->msgs;
576 while (entry) {
577 if (entry->msg_type == msg_type &&
578 os_memcmp(entry->addr, addr, ETH_ALEN) == 0) {
580 prev->next = entry->next;
582 radius->msgs = entry->next;
583 tmp = entry;
584 entry = entry->next;
593 prev = entry;
594 entry = entry->next;
843 struct radius_msg_list *entry, *prev, *_remove;
848 entry = radius->msgs;
850 while (entry) {
851 if (radius_msg_get_hdr(entry->msg)->identifier == id) {
852 hostapd_logger(radius->ctx, entry->addr,
858 prev->next = entry->next;
860 radius->msgs = entry->next;
861 _remove = entry;
864 prev = entry;
866 entry = entry->next;
883 struct radius_msg_list *entry, *prev, *tmp;
889 entry = radius->msgs;
891 while (entry) {
892 if (!only_auth || entry->msg_type == RADIUS_AUTH) {
894 prev->next = entry->next;
896 radius->msgs = entry->next;
898 tmp = entry;
899 entry = entry->next;
903 prev = entry;
904 entry = entry->next;
917 struct radius_msg_list *entry;
922 for (entry = radius->msgs; entry; entry = entry->next) {
923 if (entry->msg_type == RADIUS_ACCT) {
924 entry->shared_secret = shared_secret;
925 entry->shared_secret_len = shared_secret_len;
926 radius_msg_finish_acct(entry->msg, shared_secret,
947 struct radius_msg_list *entry;
977 for (entry = radius->msgs; entry; entry = entry->next) {
978 if ((auth && entry->msg_type != RADIUS_AUTH) ||
979 (!auth && entry->msg_type != RADIUS_ACCT))
981 entry->next_try = entry->first_try + RADIUS_CLIENT_FIRST_WAIT;
982 entry->attempts = 0;
983 entry->next_wait = RADIUS_CLIENT_FIRST_WAIT * 2;
1323 struct radius_msg_list *entry, *prev, *tmp;
1326 entry = radius->msgs;
1327 while (entry) {
1328 if (entry->msg_type == RADIUS_AUTH &&
1329 os_memcmp(entry->addr, addr, ETH_ALEN) == 0) {
1337 prev->next = entry->next;
1339 radius->msgs = entry->next;
1341 tmp = entry;
1342 entry = entry->next;
1348 prev = entry;
1349 entry = entry->next;