Skip to content

Commit 5c8e7b4

Browse files
authored
NCL-1920 Failed to establish conn with Tap adapter from StrongSwan Sophos connect agent (windows) (#6)
1 parent 790bdfb commit 5c8e7b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcharon/plugins/windows_dns/windows_dns_handler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static int GetTapAdapterInfo( IWbemServices *pSvc, int *iface_idx, wchar_t *dns1
212212
{
213213
// Allocate our strings
214214
language = SysAllocString( L"WQL" );
215-
query = SysAllocString( L"SELECT * FROM Win32_NetworkAdapterConfiguration where Description LIKE 'Sophos TAP Adapter'" );
215+
query = SysAllocString( L"SELECT * FROM Win32_NetworkAdapterConfiguration where Description LIKE 'Sophos TAP Adapter%'" );
216216

217217
// Get the current DNS servers list for our adapter
218218
hres = pSvc->lpVtbl->ExecQuery( pSvc, language, query, WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &pEnumerator );
@@ -222,7 +222,7 @@ static int GetTapAdapterInfo( IWbemServices *pSvc, int *iface_idx, wchar_t *dns1
222222
break;
223223
}
224224

225-
// We assume only 1 matching result
225+
// This call picks the first matching network adapter configuration object
226226
hres = pEnumerator->lpVtbl->Next( pEnumerator, WBEM_INFINITE, 1, &pClassObj, &uReturn );
227227
if ( 0 == uReturn )
228228
{

0 commit comments

Comments
 (0)