1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-09-18 01:33:00 +03:00

Cedar: fix server crash in CleanupSession()

"ClientOption", as the name implies, is only used in a client context.

The issue was introduced in 235bd07e67. Before that, an unrelated check prevented UnixVLanSetState() from being called in a server context.
This commit is contained in:
Davide Beatrici 2020-07-11 00:31:24 +02:00
parent f84513c95b
commit 6869955acc

View File

@ -1267,7 +1267,10 @@ void CleanupSession(SESSION *s)
FreePacketAdapter(s->PacketAdapter);
}
#ifdef OS_UNIX
UnixVLanSetState(s->ClientOption->DeviceName, false);
if (s->ClientOption != NULL)
{
UnixVLanSetState(s->ClientOption->DeviceName, false);
}
#endif
if (s->OldTraffic != NULL)
{