]> git.ipfire.org Git - thirdparty/suricata.git/commit
pcap: improve pcap_breakloop support
authorVictor Julien <vjulien@oisf.net>
Tue, 11 Apr 2023 09:40:35 +0000 (11:40 +0200)
committerVictor Julien <vjulien@oisf.net>
Thu, 13 Apr 2023 05:34:48 +0000 (07:34 +0200)
commit80abc3121d40a2c28ff896516a012d49adf63434
tree4ee7d694afcf06bb1e755babd6441bee4222ccf4
parent6d8b50b748844e9de6010cde5a6b139148c0e937
pcap: improve pcap_breakloop support

When pcap_breakloop has been issued on a handle, the current pcap_dispatch
call may return -2 (PCAP_ERROR_BREAK), but it can also return the number
of processed packets if lower than the desired number. So add this condition
as a check.

(cherry picked from commit 9fe08f2374f690a901205f0df073b702f92b6345)
(cherry picked from commit 2ddd26446e3a568074650cf16ec4ad8402acdcd4)
src/source-pcap.c