mirror of
https://github.com/reactos/reactos.git
synced 2024-08-08 04:08:29 +00:00
[NETCFGX]
- Always flush default gateways because pOldConfig->Gw may be NULL if the adapter was DHCP configured svn path=/branches/wlan-bringup/; revision=54947
This commit is contained in:
parent
390f44b3f9
commit
36be6f512a
|
@ -3230,28 +3230,25 @@ INetCfgComponentControl_fnApplyRegistryChanges(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pOldConfig->Gw)
|
dwSize = 0;
|
||||||
|
if (GetIpForwardTable(NULL, &dwSize, FALSE) == ERROR_INSUFFICIENT_BUFFER)
|
||||||
{
|
{
|
||||||
dwSize = 0;
|
DWORD Index;
|
||||||
if (GetIpForwardTable(NULL, &dwSize, FALSE) == ERROR_INSUFFICIENT_BUFFER)
|
PMIB_IPFORWARDTABLE pIpForwardTable = (PMIB_IPFORWARDTABLE)CoTaskMemAlloc(dwSize);
|
||||||
|
if (pIpForwardTable)
|
||||||
{
|
{
|
||||||
DWORD Index;
|
if (GetIpForwardTable(pIpForwardTable, &dwSize, FALSE) == NO_ERROR)
|
||||||
PMIB_IPFORWARDTABLE pIpForwardTable = (PMIB_IPFORWARDTABLE)CoTaskMemAlloc(dwSize);
|
|
||||||
if (pIpForwardTable)
|
|
||||||
{
|
{
|
||||||
if (GetIpForwardTable(pIpForwardTable, &dwSize, FALSE) == NO_ERROR)
|
for (Index = 0; Index < pIpForwardTable->dwNumEntries; Index++)
|
||||||
{
|
{
|
||||||
for (Index = 0; Index < pIpForwardTable->dwNumEntries; Index++)
|
if (pIpForwardTable->table[Index].dwForwardIfIndex == pOldConfig->Index &&
|
||||||
|
pIpForwardTable->table[Index].dwForwardDest == 0)
|
||||||
{
|
{
|
||||||
if (pIpForwardTable->table[Index].dwForwardIfIndex == pOldConfig->Index &&
|
DeleteIpForwardEntry(&pIpForwardTable->table[Index]);
|
||||||
pIpForwardTable->table[Index].dwForwardDest == 0)
|
|
||||||
{
|
|
||||||
DeleteIpForwardEntry(&pIpForwardTable->table[Index]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CoTaskMemFree(pIpForwardTable);
|
|
||||||
}
|
}
|
||||||
|
CoTaskMemFree(pIpForwardTable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue