From 9d677ea006c284b4ec4b478c09cead667aaeb803 Mon Sep 17 00:00:00 2001 From: Ken Steele Date: Sat, 18 May 2013 16:01:29 -0400 Subject: [PATCH] Clear the PKT_ALLOC flag when storing Packets into the Packet pool. The PKT_ALLOC flag is set by PacketGetFromAlloc(), which needs to be cleared for Packets in the Packet Pool, so clear the flag here. --- src/tmqh-packetpool.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tmqh-packetpool.c b/src/tmqh-packetpool.c index 99ab6f8458..d8f3cc3c30 100644 --- a/src/tmqh-packetpool.c +++ b/src/tmqh-packetpool.c @@ -96,6 +96,10 @@ void PacketPoolStorePacket(Packet *p) { exit(1); } + /* Clear the PKT_ALLOC flag, since that indicates to push back + * onto the ring buffer. */ + p->flags &= ~PKT_ALLOC; + RingBufferMrMwPut(ringbuffer, (void *)p); SCLogDebug("buffersize %u", RingBufferSize(ringbuffer)); }