]> git.ipfire.org Git - thirdparty/suricata.git/commit
source/pcap: fix infinite loop if interface goes down 7672/head
authorJuliana Fajardini <jufajardini@oisf.net>
Tue, 28 Jun 2022 20:06:50 +0000 (17:06 -0300)
committerJuliana Fajardini <jufajardini@oisf.net>
Mon, 1 Aug 2022 18:59:35 +0000 (15:59 -0300)
commitc56871c9e638d5d1204d11ce1a57f7d8aa3ba67f
tree0f80386efde78e7e6b7ad3f725d04c7b354035d4
parent41967bf1191f3d0af902e7a74a217a4b6473e401
source/pcap: fix infinite loop if interface goes down

When in live-pcap mode, if the sniffed interface went down and up again,
Suri would enter an infinite and keep running, while not registering new
events. This fixes that behavior by allowing Suri to retry to open the
pcap in case of a retry on an already activated capture
('PCAP_ERROR_ACTIVATED').

This change is based on Zhiyuan Liao's work.

Bug #3846

(cherry picked from commit 2544be4672215d8c86c68f0d03c8fd88f498f1d2)
src/source-pcap.c