api: do not make dead gateway detection failures fatal

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2020-11-17 16:27:11 +01:00
parent f7c2ea4ded
commit a9f8b2b764

View File

@ -1524,7 +1524,7 @@ static _Return_type_success_(return != NULL) WINTUN_ADAPTER *CreateAdapter(
RegCloseKey(TcpipInterfaceRegKey); RegCloseKey(TcpipInterfaceRegKey);
if (LastError == ERROR_SUCCESS) if (LastError == ERROR_SUCCESS)
break; break;
if (LastError != ERROR_TRANSACTION_NOT_ACTIVE || Tries == 299) if (LastError != ERROR_TRANSACTION_NOT_ACTIVE)
{ {
LOG_ERROR(L"Failed to set EnableDeadGWDetect", LastError); LOG_ERROR(L"Failed to set EnableDeadGWDetect", LastError);
goto cleanupTcpipAdapterRegKey; goto cleanupTcpipAdapterRegKey;