]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
af-packet: fix livedev packets counter
authorEric Leblond <eric@regit.org>
Thu, 27 Feb 2014 10:41:07 +0000 (11:41 +0100)
committerEric Leblond <eric@regit.org>
Thu, 27 Feb 2014 10:41:07 +0000 (11:41 +0100)
Packets counter is incremented in AFPDumpCounters and it was
also incremented during packet reading. The result was a value
that is twice the expected result.

Spotted-by: Victor Julien <victor@inliniac.net>
src/source-af-packet.c

index a14990578af327f8ff835eae5db91f3b4594fc45..3604d4c0e3ac1b9df5f1860d7013c386c3f1fc4e 100644 (file)
@@ -778,7 +778,6 @@ int AFPReadFromRing(AFPThreadVars *ptv)
 
         ptv->pkts++;
         ptv->bytes += h.h2->tp_len;
-        (void) SC_ATOMIC_ADD(ptv->livedev->pkts, 1);
         p->livedev = ptv->livedev;
 
         /* add forged header */