1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-24 10:29:53 +03:00

Merge pull request #2044 from Evengard/fix2043

Incorrect variable used while iterating through sessions which makes the loop stuck
This commit is contained in:
Ilya Shipitsin 2024-09-09 21:06:40 +02:00 committed by GitHub
commit e3e0c33e3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2138,9 +2138,9 @@ void L2TPProcessInterrupts(L2TP_SERVER *l2tp)
UINT64 l2tpTimeout = L2TP_TUNNEL_TIMEOUT; UINT64 l2tpTimeout = L2TP_TUNNEL_TIMEOUT;
// If we got on ANY session a higher timeout than the default L2TP tunnel timeout, increase it // 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) if (s->TubeRecv != NULL && s->TubeRecv->DataTimeout > l2tpTimeout)
{ {