From 8b40ffd344971073013aabe3c9c4a2db47ca7b43 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 20 Nov 2018 10:33:07 -0800 Subject: Count only packets that were handed to the callback. That's how other devices work. --- pcap-snf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pcap-snf.c') diff --git a/pcap-snf.c b/pcap-snf.c index 2086c51a..c030cd09 100644 --- a/pcap-snf.c +++ b/pcap-snf.c @@ -182,8 +182,8 @@ snf_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user) hdr.caplen = caplen; hdr.len = req.length; callback(user, &hdr, req.pkt_addr); + n++; } - n++; /* After one successful packet is received, we won't block * again for that timeout. */ -- cgit v1.2.1