]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
af-packet: fix error handling 931/head
authorEric Leblond <eric@regit.org>
Fri, 11 Apr 2014 10:14:01 +0000 (12:14 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 14 Apr 2014 09:11:10 +0000 (11:11 +0200)
Only exit from synchronization loop on poll error and not in case
of a timeout.

src/source-af-packet.c

index a83e21eb388c4013f2a77f37ceabcb03bd0a6e85..beb7853ebc9d73e702acbdf95945f54c8bb357f6 100644 (file)
@@ -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;
         }