Author: cgutman
Date: Fri Jan 16 17:30:40 2009
New Revision: 38800
URL:
http://svn.reactos.org/svn/reactos?rev=38800&view=rev
Log:
- Merge aicom-network-fixes up to r38799
- This should finally fix the "UNTRACK: SPECIFIED ALREADY FREE ITEM 0" bug
Modified:
trunk/reactos/lib/drivers/ip/network/ip.c
trunk/reactos/lib/drivers/ip/network/loopback.c
Modified: trunk/reactos/lib/drivers/ip/network/ip.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/ip.…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/ip.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/ip.c [iso-8859-1] Fri Jan 16 17:30:40 2009
@@ -293,8 +293,6 @@
IF->Index = ChosenIndex;
- IPAddInterfaceRoute( IF );
-
/* Add interface to the global interface list */
TcpipInterlockedInsertTailList(&InterfaceListHead,
&IF->ListEntry,
@@ -345,6 +343,21 @@
}
+VOID DefaultProtocolHandler(
+ PIP_INTERFACE Interface,
+ PIP_PACKET IPPacket)
+/*
+ * FUNCTION: Default handler for Internet protocols
+ * ARGUMENTS:
+ * NTE = Pointer to net table entry which the packet was received on
+ * IPPacket = Pointer to an IP packet that was received
+ */
+{
+ TI_DbgPrint(MID_TRACE, ("[IF %x] Packet of unknown Internet protocol "
+ "discarded.\n", Interface));
+}
+
+
VOID IPRegisterProtocol(
UINT ProtocolNumber,
IP_PROTOCOL_HANDLER Handler)
@@ -362,22 +375,7 @@
return;
}
- ProtocolTable[ProtocolNumber] = Handler;
-}
-
-
-VOID DefaultProtocolHandler(
- PIP_INTERFACE Interface,
- PIP_PACKET IPPacket)
-/*
- * FUNCTION: Default handler for Internet protocols
- * ARGUMENTS:
- * NTE = Pointer to net table entry which the packet was received on
- * IPPacket = Pointer to an IP packet that was received
- */
-{
- TI_DbgPrint(MID_TRACE, ("[IF %x] Packet of unknown Internet protocol "
- "discarded.\n", Interface));
+ ProtocolTable[ProtocolNumber] = Handler ? Handler : DefaultProtocolHandler;
}
Modified: trunk/reactos/lib/drivers/ip/network/loopback.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/loo…
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/loopback.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/loopback.c [iso-8859-1] Fri Jan 16 17:30:40 2009
@@ -199,6 +199,7 @@
AddrInitIPv4(&Loopback->Broadcast, LOOPBACK_BCASTADDR_IPv4);
IPRegisterInterface(Loopback);
+ IPAddInterfaceRoute(Loopback);
TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));