Lines Matching refs:entry

31  * Maximum number of server failovers before the entry is removed from
366 struct radius_msg_list *entry,
377 if (entry->msg_type == RADIUS_ACCT ||
378 entry->msg_type == RADIUS_ACCT_INTERIM) {
389 if (entry->attempts == 0)
406 if (entry->attempts == 0)
414 if (entry->msg_type == RADIUS_ACCT_INTERIM) {
418 MAC2STR(entry->addr));
420 radius->interim_error_cb(entry->addr,
431 if (entry->msg_type == RADIUS_ACCT &&
432 radius_msg_get_attr_ptr(entry->msg, RADIUS_ATTR_ACCT_DELAY_TIME,
443 hdr = radius_msg_get_hdr(entry->msg);
447 delay_time = now - entry->first_try;
453 radius_msg_finish_acct(entry->msg, entry->shared_secret,
454 entry->shared_secret_len);
456 radius_msg_dump(entry->msg);
459 /* retransmit; remove entry if too many attempts */
460 if (entry->accu_attempts > RADIUS_CLIENT_MAX_FAILOVER *
467 entry->attempts++;
468 entry->accu_attempts++;
469 hostapd_logger(radius->ctx, entry->addr, HOSTAPD_MODULE_RADIUS,
471 radius_msg_get_hdr(entry->msg)->identifier);
473 os_get_reltime(&entry->last_attempt);
474 buf = radius_msg_get_buf(entry->msg);
476 if (radius_client_handle_send_error(radius, s, entry->msg_type)
481 entry->next_try = now + entry->next_wait;
482 entry->next_wait *= 2;
483 if (entry->next_wait > RADIUS_CLIENT_MAX_WAIT)
484 entry->next_wait = RADIUS_CLIENT_MAX_WAIT;
495 struct radius_msg_list *entry, *prev, *tmp;
500 entry = radius->msgs;
501 if (!entry)
506 while (entry) {
507 if (now.sec >= entry->next_try) {
508 s = entry->msg_type == RADIUS_AUTH ? radius->auth_sock :
510 if (entry->attempts > RADIUS_CLIENT_NUM_FAILOVER ||
511 (s < 0 && entry->attempts > 0)) {
512 if (entry->msg_type == RADIUS_ACCT ||
513 entry->msg_type == RADIUS_ACCT_INTERIM)
519 entry = entry->next;
528 entry = radius->msgs;
532 while (entry) {
534 if (now.sec >= entry->next_try &&
535 radius_client_retransmit(radius, entry, now.sec)) {
537 prev->next = entry->next;
539 radius->msgs = entry->next;
541 tmp = entry;
542 entry = entry->next;
551 entry = radius->msgs;
556 if (first == 0 || entry->next_try < first)
557 first = entry->next_try;
559 prev = entry;
560 entry = entry->next;
581 struct radius_msg_list *entry;
591 for (entry = radius->msgs; entry; entry = entry->next) {
592 if (entry->msg_type == RADIUS_AUTH)
610 struct radius_msg_list *entry;
620 for (entry = radius->msgs; entry; entry = entry->next) {
621 if (entry->msg_type == RADIUS_ACCT ||
622 entry->msg_type == RADIUS_ACCT_INTERIM)
640 struct radius_msg_list *entry;
649 for (entry = radius->msgs; entry; entry = entry->next) {
650 if (first == 0 || entry->next_try < first)
651 first = entry->next_try;
671 struct radius_msg_list *entry, *prev;
680 entry = os_zalloc(sizeof(*entry));
681 if (entry == NULL) {
688 os_memcpy(entry->addr, addr, ETH_ALEN);
689 entry->msg = msg;
690 entry->msg_type = msg_type;
691 entry->shared_secret = shared_secret;
692 entry->shared_secret_len = shared_secret_len;
693 os_get_reltime(&entry->last_attempt);
694 entry->first_try = entry->last_attempt.sec;
695 entry->next_try = entry->first_try + RADIUS_CLIENT_FIRST_WAIT;
696 entry->attempts = 1;
697 entry->accu_attempts = 1;
698 entry->next_wait = RADIUS_CLIENT_FIRST_WAIT * 2;
699 if (entry->next_wait > RADIUS_CLIENT_MAX_WAIT)
700 entry->next_wait = RADIUS_CLIENT_MAX_WAIT;
701 entry->next = radius->msgs;
702 radius->msgs = entry;
708 while (entry->next) {
709 prev = entry;
710 entry = entry->next;
714 radius_client_msg_free(entry);
970 struct radius_msg_list *entry, *prev, *_remove;
975 entry = radius->msgs;
977 while (entry) {
978 if (radius_msg_get_hdr(entry->msg)->identifier == id) {
979 hostapd_logger(radius->ctx, entry->addr,
985 prev->next = entry->next;
987 radius->msgs = entry->next;
988 _remove = entry;
991 prev = entry;
993 entry = entry->next;
1010 struct radius_msg_list *entry, *prev, *tmp;
1016 entry = radius->msgs;
1018 while (entry) {
1019 if (!only_auth || entry->msg_type == RADIUS_AUTH) {
1021 prev->next = entry->next;
1023 radius->msgs = entry->next;
1025 tmp = entry;
1026 entry = entry->next;
1030 prev = entry;
1031 entry = entry->next;
1044 struct radius_msg_list *entry;
1049 for (entry = radius->msgs; entry; entry = entry->next) {
1050 if (entry->msg_type == RADIUS_ACCT) {
1051 entry->shared_secret = shared_secret;
1052 entry->shared_secret_len = shared_secret_len;
1053 radius_msg_finish_acct(entry->msg, shared_secret,
1074 struct radius_msg_list *entry;
1114 for (entry = radius->msgs; oserv && entry; entry = entry->next) {
1115 if ((auth && entry->msg_type != RADIUS_AUTH) ||
1116 (!auth && entry->msg_type != RADIUS_ACCT))
1118 entry->next_try = entry->first_try + RADIUS_CLIENT_FIRST_WAIT;
1119 entry->attempts = 1;
1120 entry->next_wait = RADIUS_CLIENT_FIRST_WAIT * 2;
1525 struct radius_msg_list *entry, *prev, *tmp;
1528 entry = radius->msgs;
1529 while (entry) {
1530 if (entry->msg_type == RADIUS_AUTH &&
1531 os_memcmp(entry->addr, addr, ETH_ALEN) == 0) {
1539 prev->next = entry->next;
1541 radius->msgs = entry->next;
1543 tmp = entry;
1544 entry = entry->next;
1550 prev = entry;
1551 entry = entry->next;