Hello,
Will Roberts, le lun. 22 sept. 2025 18:41:20 -0400, a ecrit:
> When working with a slow RADIUS server, l2tpns can lose track of IPs in its
> assignable pool causing the daemon to eventually run out of assignable
> addresses. The messages below show the last IP in the pool being lost, and the
> next connection being rejected.
>
> 2025-09-17 11:29:36 03/00 New tunnel from 1.2.3.4:1701 ID 3
> 2025-09-17 11:29:40 03/14 Shutting down session 14: RADIUS timeout.
> 2025-09-17 11:29:40 03/14 Login by stats at 10.42.96.253 from 1.2.3.4
> (host.example.com)
Oh, indeed it takes into account the response even if it shut down the
session.
Could you try the attached patch?
Samuel
diff --git a/radius.c b/radius.c
index 04a39fc..2066b19 100644
--- a/radius.c
+++ b/radius.c
@@ -205,7 +205,10 @@ void radiussend(uint16_t r, uint8_t state)
if (s)
{
if (state == RADIUSAUTH || state == RADIUSJUSTAUTH)
+ {
+ radiusclear(r, s);
sessionshutdown(s, "RADIUS timeout.",
CDN_ADMIN_DISC, TERM_REAUTHENTICATION_FAILURE);
+ }
else
{
LOG(1, s, session[s].tunnel, "RADIUS timeout,
but in state %s so don't timeout session\n",