summaryrefslogtreecommitdiff
path: root/accel-pppd/radius/auth.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-10-23 16:42:06 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-10-23 16:46:27 +0400
commit90125d7cad59c2c47e1a5765261af4a9d817e7e8 (patch)
treef08d55d46147e8f4e252a84d32663b2e036bc3e2 /accel-pppd/radius/auth.c
parent744f633e56d88d86cbf16bfa77fe3177d9c71a6b (diff)
downloadaccel-ppp-90125d7cad59c2c47e1a5765261af4a9d817e7e8.tar.gz
accel-ppp-90125d7cad59c2c47e1a5765261af4a9d817e7e8.zip
radius: introduced max-fail option
Before this patch any single fail (no responce for max_try requests) caused radius server to enter "fail" state, which may be unwanted behaviour, because radius may not respond for interim Accounting-Request by some reasons. This patch introduces "max-fail" option which specifies number of unreplied requests in a row after which server enters into "fail" state. (Actual only for multi-server configurations)
Diffstat (limited to 'accel-pppd/radius/auth.c')
-rw-r--r--accel-pppd/radius/auth.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/accel-pppd/radius/auth.c b/accel-pppd/radius/auth.c
index d166192a..2124c4b4 100644
--- a/accel-pppd/radius/auth.c
+++ b/accel-pppd/radius/auth.c
@@ -199,6 +199,8 @@ static void rad_auth_recv(struct rad_req_t *req)
static void rad_auth_timeout(struct triton_timer_t *t)
{
struct rad_req_t *req = container_of(t, typeof(*req), timeout);
+
+ rad_server_timeout(req->serv);
__sync_add_and_fetch(&req->serv->stat_auth_lost, 1);
stat_accm_add(req->serv->stat_auth_lost_1m, 1);