diff options
author | dnobori <da.git@softether.co.jp> | 2015-05-31 13:02:35 +0300 |
---|---|---|
committer | dnobori <da.git@softether.co.jp> | 2015-05-31 13:02:35 +0300 |
commit | ff497063732fdc08300c8bc166f4d4f62317e98a (patch) | |
tree | cfadea91c0b83255d9f137e75903031bcb572744 /src/Cedar/VLanWin32.c | |
parent | 7785c41f3881f4527705c808c0e2a8d8a6e6d822 (diff) |
v4.17-9562-beta
Diffstat (limited to 'src/Cedar/VLanWin32.c')
-rw-r--r-- | src/Cedar/VLanWin32.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/Cedar/VLanWin32.c b/src/Cedar/VLanWin32.c index 81c5fac1..c8d54df9 100644 --- a/src/Cedar/VLanWin32.c +++ b/src/Cedar/VLanWin32.c @@ -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)
+ Format(tmp, sizeof(tmp), VLAN_ADAPTER_NAME_TAG, v->InstanceName);
+ a = MsGetAdapter(tmp);
+
+ if (a != NULL)
{
- bool ret = Win32ReleaseAddressByGuidEx(a->Guid, 50);
- Debug("*** Win32ReleaseAddressByGuid = %u\n", ret);
- }
+ if (a->UseDhcp)
+ {
+ bool ret = Win32ReleaseAddressByGuidEx(a->Guid, 50);
+ Debug("*** Win32ReleaseAddressByGuid = %u\n", ret);
+ }
- MsFreeAdapter(a);
+ MsFreeAdapter(a);
+ }
}
}
|