]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Clear the PKT_ALLOC flag when storing Packets into the Packet pool.
authorKen Steele <ken@tilera.com>
Sat, 18 May 2013 20:01:29 +0000 (16:01 -0400)
committerVictor Julien <victor@inliniac.net>
Tue, 21 May 2013 16:30:13 +0000 (18:30 +0200)
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

index 99ab6f845871fcbf0eaf680df21443f768711775..d8f3cc3c3099e1584d116f7bf2713cd736cc2b0c 100644 (file)
@@ -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));
 }