Author: cgutman
Date: Fri Jan 13 23:23:58 2012
New Revision: 54946
URL: http://svn.reactos.org/svn/reactos?rev=54946&view=rev
Log:
[TCPIP]
- Fix adding a static interface route
Modified:
branches/wlan-bringup/drivers/network/tcpip/datalink/lan.c
Modified: branches/wlan-bringup/drivers/network/tcpip/datalink/lan.c
URL: http://svn.reactos.org/svn/reactos/branches/wlan-bringup/drivers/network/tc…
==============================================================================
--- branches/wlan-bringup/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original)
+++ branches/wlan-bringup/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Fri Jan 13 23:23:58 2012
@@ -638,9 +638,6 @@
TRUE);
AddrInitIPv4(&Interface->Unicast, inet_addr(RegistryDataA.Buffer));
-
- if (!AddrIsUnspecified(&Interface->Unicast))
- IPAddInterfaceRoute(Interface);
RtlFreeAnsiString(&RegistryDataA);
}
@@ -663,6 +660,13 @@
RtlFreeAnsiString(&RegistryDataA);
}
+
+ /* We have to wait until both IP address and subnet mask
+ * are read to add the interface route, but we must do it
+ * before we add the default gateway */
+ if (!AddrIsUnspecified(&Interface->Unicast) &&
+ !AddrIsUnspecified(&Interface->Netmask))
+ IPAddInterfaceRoute(Interface);
/* Read default gateway info */
Status = ZwQueryValueKey(ParameterHandle,
Author: cgutman
Date: Fri Jan 13 20:55:26 2012
New Revision: 54942
URL: http://svn.reactos.org/svn/reactos?rev=54942&view=rev
Log:
[IPHLPAPI]
- Store the NTEContext in the IP address list so netcfgx can remove IP addresses
- Fixes routing after manually setting an IP address
Modified:
branches/wlan-bringup/dll/win32/iphlpapi/iphlpapi_main.c
Modified: branches/wlan-bringup/dll/win32/iphlpapi/iphlpapi_main.c
URL: http://svn.reactos.org/svn/reactos/branches/wlan-bringup/dll/win32/iphlpapi…
==============================================================================
--- branches/wlan-bringup/dll/win32/iphlpapi/iphlpapi_main.c [iso-8859-1] (original)
+++ branches/wlan-bringup/dll/win32/iphlpapi/iphlpapi_main.c [iso-8859-1] Fri Jan 13 20:55:26 2012
@@ -639,6 +639,7 @@
ptr->IpAddressList.IpAddress.String);
toIPAddressString(getInterfaceMaskByIndex(table->indexes[ndx]),
ptr->IpAddressList.IpMask.String);
+ ptr->IpAddressList.Context = ptr->Index;
toIPAddressString(getInterfaceGatewayByIndex(table->indexes[ndx]),
ptr->GatewayList.IpAddress.String);
getDhcpInfoForAdapter(table->indexes[ndx], &dhcpEnabled,