mirror of
https://github.com/reactos/reactos.git
synced 2025-01-12 09:07:54 +00:00
* Set AutoconfigEnabled if DNS is acquired by DHCP
* Fix a handle leak svn path=/trunk/; revision=36794
This commit is contained in:
parent
521eec8b76
commit
905c093675
1 changed files with 8 additions and 0 deletions
|
@ -1504,6 +1504,7 @@ static void CreateNameServerListEnumNamesFunc( PWCHAR Interface, PWCHAR Server,
|
|||
DWORD WINAPI GetPerAdapterInfo(ULONG IfIndex, PIP_PER_ADAPTER_INFO pPerAdapterInfo, PULONG pOutBufLen)
|
||||
{
|
||||
HKEY hkey;
|
||||
DWORD dwSize = 0;
|
||||
const char *ifName;
|
||||
NAME_SERVER_LIST_CONTEXT Context;
|
||||
WCHAR keyname[200] = L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\";
|
||||
|
@ -1535,9 +1536,16 @@ DWORD WINAPI GetPerAdapterInfo(ULONG IfIndex, PIP_PER_ADAPTER_INFO pPerAdapterIn
|
|||
if (Context.uSizeRequired > Context.uSizeAvailable)
|
||||
{
|
||||
*pOutBufLen = Context.uSizeRequired;
|
||||
RegCloseKey(hkey);
|
||||
return ERROR_BUFFER_OVERFLOW;
|
||||
}
|
||||
|
||||
if(RegQueryValueExW(hkey, L"DHCPNameServer", NULL, NULL, NULL, &dwSize) == ERROR_SUCCESS)
|
||||
{
|
||||
pPerAdapterInfo->AutoconfigEnabled = TRUE;
|
||||
}
|
||||
|
||||
RegCloseKey(hkey);
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue