]> git.ipfire.org Git - thirdparty/suricata.git/commit
af-packet: fix possible infinite loop. 154/head
authorEric Leblond <eric@regit.org>
Sun, 14 Oct 2012 17:24:22 +0000 (19:24 +0200)
committerEric Leblond <eric@regit.org>
Tue, 30 Oct 2012 15:56:11 +0000 (16:56 +0100)
commitb26ec60398fbe1523fba4d995a21c6afd39d8b08
treeb460cfcb4ff135dd9174da92f579dfd5536ab0d8
parente8a4a4c47ca4d736b97bab3f24bc3ec82b31c69f
af-packet: fix possible infinite loop.

If no packet arrives to a capture thread, it is possible that the
AFPReadLoop() function goes into an infinite loop. This could cause
suricata to hang at exit on non busy system.
This patch adds a counter to detect when Suricata start looping in
the ring to stop when it reaches this point.
src/source-af-packet.c