From 6630456a67f80af368a41137dc3e1025a9bfae8c Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Thu, 27 Feb 2014 11:41:07 +0100 Subject: [PATCH] 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 --- src/source-af-packet.c | 1 - 1 file changed, 1 deletion(-) 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 */