From 8f0deb576c1473d0694a9dd93627eaa59e484ef8 Mon Sep 17 00:00:00 2001 From: Evengard Date: Sun, 25 Aug 2024 15:17:43 +0300 Subject: [PATCH] Incorrect variable used while iterating through sessions which makes the loop stuck --- src/Cedar/Proto_L2TP.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cedar/Proto_L2TP.c b/src/Cedar/Proto_L2TP.c index e211c987..08fd97eb 100644 --- a/src/Cedar/Proto_L2TP.c +++ b/src/Cedar/Proto_L2TP.c @@ -2138,9 +2138,9 @@ void L2TPProcessInterrupts(L2TP_SERVER *l2tp) UINT64 l2tpTimeout = L2TP_TUNNEL_TIMEOUT; // If we got on ANY session a higher timeout than the default L2TP tunnel timeout, increase it - for (i = 0; i < LIST_NUM(t->SessionList); i++) + for (j = 0; j < LIST_NUM(t->SessionList); j++) { - L2TP_SESSION* s = LIST_DATA(t->SessionList, i); + L2TP_SESSION* s = LIST_DATA(t->SessionList, j); if (s->TubeRecv != NULL && s->TubeRecv->DataTimeout > l2tpTimeout) {