AddrWidenAddress: set type
NBFlushPackets: We already hold the table lock when calling this.
Modified: trunk/reactos/drivers/lib/ip/network/address.c
Modified: trunk/reactos/drivers/lib/ip/network/neighbor.c
_____
Modified: trunk/reactos/drivers/lib/ip/network/address.c
--- trunk/reactos/drivers/lib/ip/network/address.c 2005-02-11
22:49:44 UTC (rev 13498)
+++ trunk/reactos/drivers/lib/ip/network/address.c 2005-02-12
03:53:19 UTC (rev 13499)
@@ -86,6 +86,7 @@
VOID AddrWidenAddress( PIP_ADDRESS Network, PIP_ADDRESS Source,
PIP_ADDRESS Netmask ) {
if( Netmask->Type == IP_ADDRESS_V4 ) {
+ Network->Type = Netmask->Type;
Network->Address.IPv4Address =
Source->Address.IPv4Address & Netmask->Address.IPv4Address;
} else {
@@ -220,8 +221,10 @@
PIP_ADDRESS Address1,
PIP_ADDRESS Address2)
{
- if (Address1->Type != Address2->Type)
+ if (Address1->Type != Address2->Type) {
+ DbgPrint("AddrIsEqual: Unequal Address Types\n");
return FALSE;
+ }
switch (Address1->Type) {
case IP_ADDRESS_V4:
@@ -231,6 +234,10 @@
return (RtlCompareMemory(&Address1->Address,
&Address2->Address,
sizeof(IPv6_RAW_ADDRESS)) == sizeof(IPv6_RAW_ADDRESS));
break;
+
+ default:
+ DbgPrint("AddrIsEqual: Bad address type\n");
+ break;
}
return FALSE;
_____
Modified: trunk/reactos/drivers/lib/ip/network/neighbor.c
--- trunk/reactos/drivers/lib/ip/network/neighbor.c 2005-02-11
22:49:44 UTC (rev 13498)
+++ trunk/reactos/drivers/lib/ip/network/neighbor.c 2005-02-12
03:53:19 UTC (rev 13499)
@@ -52,19 +52,19 @@
}
}
+/* Must be called with table lock acquired */
VOID NBFlushPacketQueue( PNEIGHBOR_CACHE_ENTRY NCE,
BOOL CallComplete,
NTSTATUS ErrorCode ) {
PLIST_ENTRY PacketEntry;
PNEIGHBOR_PACKET Packet;
- PacketEntry = ExInterlockedRemoveHeadList(&NCE->PacketQueue,
- &NCE->Table->Lock);
- while( PacketEntry != NULL ) {
+ while( !IsListEmpty(&NCE->PacketQueue) ) {
+ PacketEntry = RemoveHeadList(&NCE->PacketQueue);
Packet = CONTAINING_RECORD
( PacketEntry, NEIGHBOR_PACKET, Next );
- ASSERT_KM_POINTER(Packet);
+ ASSERT_KM_POINTER(Packet);
TI_DbgPrint
(MID_TRACE,
@@ -72,16 +72,14 @@
PacketEntry, Packet->Packet));
if( CallComplete )
- {
- ASSERT_KM_POINTER(Packet->Complete);
+ {
+ ASSERT_KM_POINTER(Packet->Complete);
Packet->Complete( Packet->Context,
Packet->Packet,
NDIS_STATUS_REQUEST_ABORTED );
- }
+ }
PoolFreeBuffer( Packet );
- PacketEntry = ExInterlockedRemoveHeadList(&NCE->PacketQueue,
- &NCE->Table->Lock);
}
}