mirror of
https://github.com/reactos/reactos.git
synced 2025-05-01 19:50:36 +00:00
- Allocate space for the packet extension located at NdisPacketOobOffset + sizeof(NDIS_PACKET_OOB_DATA)
- Fixes more packet corruption svn path=/trunk/; revision=40880
This commit is contained in:
parent
e88065b003
commit
5e4e012cf8
1 changed files with 11 additions and 4 deletions
|
@ -428,7 +428,9 @@ NdisAllocatePacket(
|
||||||
Temp->Private.Pool = Pool;
|
Temp->Private.Pool = Pool;
|
||||||
Temp->Private.ValidCounts = TRUE;
|
Temp->Private.ValidCounts = TRUE;
|
||||||
Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
|
Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
|
||||||
Temp->Private.NdisPacketOobOffset = Pool->PacketLength - sizeof(NDIS_PACKET_OOB_DATA);
|
Temp->Private.NdisPacketOobOffset = Pool->PacketLength -
|
||||||
|
(sizeof(NDIS_PACKET_OOB_DATA) +
|
||||||
|
sizeof(NDIS_PACKET_EXTENSION));
|
||||||
|
|
||||||
*Packet = Temp;
|
*Packet = Temp;
|
||||||
*Status = NDIS_STATUS_SUCCESS;
|
*Status = NDIS_STATUS_SUCCESS;
|
||||||
|
@ -507,7 +509,8 @@ NdisAllocatePacketPoolEx(
|
||||||
NumberOfDescriptors = 0xffff;
|
NumberOfDescriptors = 0xffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
Length = sizeof(NDIS_PACKET) + sizeof(NDIS_PACKET_OOB_DATA) + ProtocolReservedLength;
|
Length = sizeof(NDIS_PACKET) + sizeof(NDIS_PACKET_OOB_DATA) +
|
||||||
|
sizeof(NDIS_PACKET_EXTENSION) + ProtocolReservedLength;
|
||||||
Size = sizeof(NDISI_PACKET_POOL) + Length * NumberOfDescriptors;
|
Size = sizeof(NDISI_PACKET_POOL) + Length * NumberOfDescriptors;
|
||||||
|
|
||||||
Pool = ExAllocatePool(NonPagedPool, Size);
|
Pool = ExAllocatePool(NonPagedPool, Size);
|
||||||
|
@ -712,7 +715,9 @@ NdisDprAllocatePacket(
|
||||||
Temp->Private.Pool = Pool;
|
Temp->Private.Pool = Pool;
|
||||||
Temp->Private.ValidCounts = TRUE;
|
Temp->Private.ValidCounts = TRUE;
|
||||||
Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
|
Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
|
||||||
Temp->Private.NdisPacketOobOffset = Pool->PacketLength - sizeof(NDIS_PACKET_OOB_DATA);
|
Temp->Private.NdisPacketOobOffset = Pool->PacketLength -
|
||||||
|
(sizeof(NDIS_PACKET_OOB_DATA) +
|
||||||
|
sizeof(NDIS_PACKET_EXTENSION));
|
||||||
|
|
||||||
*Packet = Temp;
|
*Packet = Temp;
|
||||||
*Status = NDIS_STATUS_SUCCESS;
|
*Status = NDIS_STATUS_SUCCESS;
|
||||||
|
@ -762,7 +767,9 @@ NdisDprAllocatePacketNonInterlocked(
|
||||||
Temp->Private.Pool = Pool;
|
Temp->Private.Pool = Pool;
|
||||||
Temp->Private.ValidCounts = TRUE;
|
Temp->Private.ValidCounts = TRUE;
|
||||||
Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
|
Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
|
||||||
Temp->Private.NdisPacketOobOffset = Pool->PacketLength - sizeof(NDIS_PACKET_OOB_DATA);
|
Temp->Private.NdisPacketOobOffset = Pool->PacketLength -
|
||||||
|
(sizeof(NDIS_PACKET_OOB_DATA) +
|
||||||
|
sizeof(NDIS_PACKET_EXTENSION));
|
||||||
|
|
||||||
*Packet = Temp;
|
*Packet = Temp;
|
||||||
*Status = NDIS_STATUS_SUCCESS;
|
*Status = NDIS_STATUS_SUCCESS;
|
||||||
|
|
Loading…
Reference in a new issue