From: Eric Leblond Date: Thu, 27 Feb 2014 10:41:07 +0000 (+0100) Subject: af-packet: fix livedev packets counter X-Git-Tag: suricata-2.0rc2~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6630456a67f80af368a41137dc3e1025a9bfae8c;p=thirdparty%2Fsuricata.git af-packet: fix livedev packets counter 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 --- diff --git a/src/source-af-packet.c b/src/source-af-packet.c index a14990578a..3604d4c0e3 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -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 */