Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for RADIUS Challenge with multiple servers #76

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/freeradius-client.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ typedef struct value_pair
#define OK_RC 0
#define TIMEOUT_RC 1
#define REJECT_RC 2
#define CHALLENGE_RC 3

typedef struct send_data /* Used to pass information to sendserver() function */
{
Expand Down
6 changes: 3 additions & 3 deletions lib/buildreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ int rc_aaa(rc_handle *rh, uint32_t client_port, VALUE_PAIR *send, VALUE_PAIR **r
skip_count = 0;
result = ERROR_RC;
for (i=0; (i < aaaserver->max) && (result != OK_RC) && (result != REJECT_RC)
; i++, now = rc_getctime())
&& (result != CHALLENGE_RC); i++, now = rc_getctime())
{
if (aaaserver->deadtime_ends[i] != -1 &&
aaaserver->deadtime_ends[i] > start_time) {
Expand All @@ -140,12 +140,12 @@ int rc_aaa(rc_handle *rh, uint32_t client_port, VALUE_PAIR *send, VALUE_PAIR **r
if (result == TIMEOUT_RC && radius_deadtime > 0)
aaaserver->deadtime_ends[i] = start_time + (double)radius_deadtime;
}
if (result == OK_RC || result == REJECT_RC || skip_count == 0)
if (result == OK_RC || result == REJECT_RC || result == CHALLENGE_RC || skip_count == 0)
goto exit;

result = ERROR_RC;
for (i=0; (i < aaaserver->max) && (result != OK_RC) && (result != REJECT_RC)
; i++)
&& (result != CHALLENGE_RC); i++)
{
if (aaaserver->deadtime_ends[i] == -1 ||
aaaserver->deadtime_ends[i] <= start_time) {
Expand Down