Use packet pool for pseudo packets on flow timeout. Wait for a packet
if necessary.
For shutdown, alloc a new pool as the 'main()' thread calls this.
TcpSession *ssn,
int dummy)
{
- Packet *p;
-
- p = PacketGetFromAlloc();
- if (p == NULL)
+ PacketPoolWait();
+ Packet *p = PacketPoolGetPacket();
+ if (p == NULL) {
return NULL;
+ }
+
+ PACKET_PROFILING_START(p);
return FlowForceReassemblyPseudoPacketSetup(p, direction, f, ssn, dummy);
}
*/
void FlowForceReassembly(void)
{
+ /* called by 'main()' which has no packet pool */
+ PacketPoolInit();
/* Carry out flow reassembly for unattended flows */
FlowForceReassemblyForHash();
-
+ PacketPoolDestroy();
return;
}