From: Eric Leblond Date: Fri, 11 Apr 2014 10:14:01 +0000 (+0200) Subject: af-packet: fix error handling X-Git-Tag: suricata-2.0.1rc1~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F931%2Fhead;p=thirdparty%2Fsuricata.git af-packet: fix error handling Only exit from synchronization loop on poll error and not in case of a timeout. --- diff --git a/src/source-af-packet.c b/src/source-af-packet.c index a83e21eb38..beb7853ebc 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -1067,7 +1067,7 @@ static int AFPSynchronizeStart(AFPThreadVars *ptv) } else if (r == 0 && AFPPeersListStarted()) { SCLogInfo("Starting to read on %s", ptv->tv->name); return 1; - } else { + } else if (r < 0) { /* only exit on error */ SCLogWarning(SC_ERR_AFP_READ, "poll failed with retval %d", r); return 0; }