From 350d76196195f7ec015c39598c0afee9d8b7ca99 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Mon, 25 Feb 2013 14:57:55 +0100 Subject: [PATCH] af-packet: leave reading loop at each turn The idea of this patch is to be sure to leave the ring reading loop enough to be able to sync counters. This should fix #706. --- src/source-af-packet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/source-af-packet.c b/src/source-af-packet.c index 1355c82038..144ceb64c3 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -838,6 +838,8 @@ int AFPReadFromRing(AFPThreadVars *ptv) next_frame: if (++ptv->frame_offset >= ptv->req.tp_frame_nr) { ptv->frame_offset = 0; + /* Get out of loop to be sure we will reach maintenance tasks */ + SCReturnInt(AFP_READ_OK); } }