Author: cgutman
Date: Thu Apr 23 14:32:41 2009
New Revision: 40664
URL:
http://svn.reactos.org/svn/reactos?rev=40664&view=rev
Log:
- Zero the whole packet in other packet allocation routines
- Set ValidCount TRUE because we don't have any buffers chained yet
- Set the fPACKET_ALLOCATED_BY_NDIS flag (fixes storing media-specific data)
Modified:
trunk/reactos/drivers/network/ndis/ndis/buffer.c
Modified: trunk/reactos/drivers/network/ndis/ndis/buffer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/buffer.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/buffer.c [iso-8859-1] Thu Apr 23 14:32:41
2009
@@ -426,6 +426,8 @@
RtlZeroMemory(Temp, sizeof(NDIS_PACKET));
Temp->Private.Pool = Pool;
+ Temp->Private.ValidCounts = TRUE;
+ Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
*Packet = Temp;
*Status = NDIS_STATUS_SUCCESS;
@@ -705,8 +707,10 @@
KeReleaseSpinLockFromDpcLevel(&Pool->SpinLock.SpinLock);
- RtlZeroMemory(&Temp->Private, sizeof(NDIS_PACKET_PRIVATE));
+ RtlZeroMemory(Temp, sizeof(NDIS_PACKET));
Temp->Private.Pool = Pool;
+ Temp->Private.ValidCounts = TRUE;
+ Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
*Packet = Temp;
*Status = NDIS_STATUS_SUCCESS;
@@ -752,8 +756,10 @@
Temp = Pool->FreeList;
Pool->FreeList = (PNDIS_PACKET)Temp->Reserved[0];
- RtlZeroMemory(&Temp->Private, sizeof(NDIS_PACKET_PRIVATE));
+ RtlZeroMemory(Temp, sizeof(NDIS_PACKET));
Temp->Private.Pool = Pool;
+ Temp->Private.ValidCounts = TRUE;
+ Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
*Packet = Temp;
*Status = NDIS_STATUS_SUCCESS;
@@ -1102,4 +1108,4 @@
*Buffer = NdisBuffer;
}
-/* EOF */
+/* EOF */