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,