]> git.ipfire.org Git - thirdparty/suricata.git/commit
pfring: call enable_ring after set_cluster 881/head
authorVictor Julien <victor@inliniac.net>
Mon, 10 Mar 2014 07:54:40 +0000 (08:54 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 10 Mar 2014 07:54:40 +0000 (08:54 +0100)
commitfdb1bd96680c1921aaed93d54f198a4e71435e7f
treea3bcd1ada31f37bbb19bec0f9429d6e4ef14f108
parent845cbcce90a1d5c2f92c7e9034b8166666298793
pfring: call enable_ring after set_cluster

Move pfring_enable_ring to the start of ReceivePfringLoop() so that
it's guaranteed to be called after all threads have called
pfring_set_cluster first.

This is necessary because pfring will already make packets available
to thread N, while thread N+1 is still registering itself. This leads
to cases where the first packet(s) of a flow are processed by a
different thread in Suricata than the later ones.

This is a race condition only at start up. New flows after the pfring
initialization is complete will not be influenced by this.

Bug #1129.
src/source-pfring.c