From: Ken Steele Date: Sat, 18 May 2013 20:01:29 +0000 (-0400) Subject: Clear the PKT_ALLOC flag when storing Packets into the Packet pool. X-Git-Tag: suricata-2.0beta1~133 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9d677ea006c284b4ec4b478c09cead667aaeb803;p=thirdparty%2Fsuricata.git 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. --- 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)); }