af-packet: re-enable sync for tpacket v2

Synchronize start was disabled for v2 when v3 was introduced, without
a reason being given.

Re-enable as v2 will otherwise also start reading packets before the
other threads are set up. This will lead to hashing issues.

Part of bug #2788.
pull/3621/head
Victor Julien 7 years ago
parent cebbe06f70
commit c99dc5a7bf

@ -1507,9 +1507,7 @@ TmEcode ReceiveAFPLoop(ThreadVars *tv, void *data, void *slot)
}
if (ptv->afp_state == AFP_STATE_UP) {
SCLogDebug("Thread %s using socket %d", tv->name, ptv->socket);
if ((ptv->flags & AFP_TPACKET_V3) != 0) {
AFPSynchronizeStart(ptv, &discarded_pkts);
}
AFPSynchronizeStart(ptv, &discarded_pkts);
/* let's reset counter as we will start the capture at the
* next function call */
#ifdef PACKET_STATISTICS

Loading…
Cancel
Save