1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-09-23 19:59:21 +03:00

v4.17-9562-beta

This commit is contained in:
dnobori
2015-05-31 19:02:35 +09:00
parent 7785c41f38
commit ff49706373
1114 changed files with 32910 additions and 1551 deletions

View File

@ -1135,19 +1135,24 @@ void VLanPaFree(SESSION *s)
{
char tmp[MAX_SIZE];
MS_ADAPTER *a;
UINT64 now = Tick64();
UINT64 suspend_tick = MsGetSuspendModeBeginTick();
Format(tmp, sizeof(tmp), VLAN_ADAPTER_NAME_TAG, v->InstanceName);
a = MsGetAdapter(tmp);
if (a != NULL)
if (suspend_tick == 0 || (suspend_tick + (UINT64)(30 * 1000)) < now)
{
if (a->UseDhcp)
{
bool ret = Win32ReleaseAddressByGuidEx(a->Guid, 50);
Debug("*** Win32ReleaseAddressByGuid = %u\n", ret);
}
Format(tmp, sizeof(tmp), VLAN_ADAPTER_NAME_TAG, v->InstanceName);
a = MsGetAdapter(tmp);
MsFreeAdapter(a);
if (a != NULL)
{
if (a->UseDhcp)
{
bool ret = Win32ReleaseAddressByGuidEx(a->Guid, 50);
Debug("*** Win32ReleaseAddressByGuid = %u\n", ret);
}
MsFreeAdapter(a);
}
}
}