aboutsummaryrefslogtreecommitdiff
path: root/pcap-pf.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcap-pf.c')
-rw-r--r--pcap-pf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pcap-pf.c b/pcap-pf.c
index 9a79bdf5..8de6e58f 100644
--- a/pcap-pf.c
+++ b/pcap-pf.c
@@ -219,7 +219,7 @@ pcap_read_pf(pcap_t *pc, int cnt, pcap_handler callback, u_char *user)
buflen -= pad;
h.caplen = buflen;
(*callback)(user, &h, p);
- if (++n >= cnt && cnt > 0) {
+ if (++n >= cnt && !PACKET_COUNT_IS_UNLIMITED(cnt)) {
pc->cc = cc;
pc->bp = bp;
return (n);