]> git.ipfire.org Git - thirdparty/suricata.git/commit
source/pcap: fix infinite loop if interface goes down
authorJuliana Fajardini <jufajardini@oisf.net>
Tue, 28 Jun 2022 20:06:50 +0000 (17:06 -0300)
committerVictor Julien <vjulien@oisf.net>
Wed, 29 Jun 2022 07:25:33 +0000 (09:25 +0200)
commit2544be4672215d8c86c68f0d03c8fd88f498f1d2
treeeae94e95825de6655fe9d5bdb3b7ff4a5ce45ab0
parentdc6fff2cca643b0f8b429fc4b2d60c8c421945be
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
src/source-pcap.c