Author: cgutman
Date: Mon Jan 12 20:34:39 2009
New Revision: 38743
URL:
http://svn.reactos.org/svn/reactos?rev=38743&view=rev
Log:
- Merge aicom-network-fixes up to r38730
Modified:
trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c
trunk/reactos/lib/drivers/ip/network/ip.c
Modified: trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] Mon Jan 12 20:34:39
2009
@@ -1553,6 +1553,7 @@
IF->Unicast.Address.IPv4Address = IpAddrChange->Address;
IF->Netmask.Type = IP_ADDRESS_V4;
IF->Netmask.Address.IPv4Address = IpAddrChange->Netmask;
+ IF->Broadcast.Type = IP_ADDRESS_V4;
IF->Broadcast.Address.IPv4Address =
IF->Unicast.Address.IPv4Address |
~IF->Netmask.Address.IPv4Address;
@@ -1587,6 +1588,8 @@
IF->Unicast.Address.IPv4Address = 0;
IF->Netmask.Type = IP_ADDRESS_V4;
IF->Netmask.Address.IPv4Address = 0;
+ IF->Broadcast.Type = IP_ADDRESS_V4;
+ IF->Broadcast.Address.IPv4Address = 0;
Status = STATUS_SUCCESS;
}
} EndFor(IF);
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] Mon Jan 12 20:34:39 2009
@@ -147,7 +147,8 @@
TI_DbgPrint(MIN_TRACE, ("IPv6 datagram discarded.\n"));
return;
default:
- Protocol = 0;
+ TI_DbgPrint(MIN_TRACE, ("Unrecognized datagram discarded.\n"));
+ return;
}
if (Protocol < IP_PROTOCOL_TABLE_SIZE)
@@ -308,22 +309,20 @@
PNEIGHBOR_CACHE_ENTRY NCE;
IP_ADDRESS GeneralRoute;
- TCPDisposeInterfaceData( IF->TCPContext );
- IF->TCPContext = NULL;
-
- TI_DbgPrint(DEBUG_IP,("Removing interface Addr %s\n",
A2S(&IF->Unicast)));
- TI_DbgPrint(DEBUG_IP,(" Mask %s\n",
A2S(&IF->Netmask)));
-
- AddrWidenAddress(&GeneralRoute,&IF->Unicast,&IF->Netmask);
-
- RouterRemoveRoute(&GeneralRoute, &IF->Unicast);
-
- /* Remove permanent NCE, but first we have to find it */
NCE = NBLocateNeighbor(&IF->Unicast);
if (NCE)
- NBRemoveNeighbor(NCE);
- else
- TI_DbgPrint(DEBUG_IP, ("Could not delete IF route (0x%X)\n", IF));
+ {
+ TCPDisposeInterfaceData( IF->TCPContext );
+
+ TI_DbgPrint(DEBUG_IP,("Removing interface Addr %s\n",
A2S(&IF->Unicast)));
+ TI_DbgPrint(DEBUG_IP,(" Mask %s\n",
A2S(&IF->Netmask)));
+
+ AddrWidenAddress(&GeneralRoute,&IF->Unicast,&IF->Netmask);
+
+ RouterRemoveRoute(&GeneralRoute, &IF->Unicast);
+
+ NBRemoveNeighbor(NCE);
+ }
}
VOID IPUnregisterInterface(