Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source/pcap: fix infinite loop if interface goes down (6.0.x backport) - v1 #7672

Merged

Conversation

jufajardini
Copy link
Contributor

@jufajardini jufajardini commented Aug 1, 2022

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 2544be4)

Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/5436

Describe changes:

  • as per Zhiyuan Liao's contribution suggested for master, allow Suri to retry to open the pcap in case of a retry on an already activated capture

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 OISF#3846

(cherry picked from commit 2544be4)
@jufajardini jufajardini marked this pull request as ready for review August 1, 2022 19:56
@jufajardini jufajardini requested a review from a team as a code owner August 1, 2022 19:56
@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 8444

@victorjulien victorjulien merged commit c56871c into OISF:master-6.0.x Aug 2, 2022
@victorjulien
Copy link
Member

Thanks!

@jufajardini jufajardini deleted the bug-3846-backport-60x/v1 branch August 2, 2022 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants