]> git.ipfire.org Git - thirdparty/suricata.git/commit
pcap: fix return check 8716/head
authorVictor Julien <vjulien@oisf.net>
Wed, 12 Apr 2023 17:21:53 +0000 (19:21 +0200)
committerVictor Julien <vjulien@oisf.net>
Wed, 12 Apr 2023 18:05:06 +0000 (20:05 +0200)
commit2ddd26446e3a568074650cf16ec4ad8402acdcd4
treeb223e782be1483a731465fdfd69b51e6920d4264
parent5f52b199ff0a49628fa00103d86bd72c5792a6b0
pcap: fix return check

The check that meant to check if pcap_dispatch processed fewer packets
than the desired number was inaccurate. It would also include all errors
(negative return values).

This patch considers only positive values for this check.

Fixes: 9fe08f2374f6 ("pcap: improve pcap_breakloop support")
src/source-pcap.c