Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report periodic stats only when safe to do so. [skip ci]
As explained in GH #155, when tcpdump is given -r, -w and -v and it takes long enough to read from the input file (because it is stdin connected through network or a pipe to stdout of another tcpdump doing a live capture), pcap_loop() will error before long. One of the ways to reproduce the fault is as follows: $ tcpdump -i eno1 -w - | tcpdump -r - -w /tmp/tmp.pcap -v tcpdump: listening on eno1, link-type EN10MB (Ethernet), snapshot length 262144 bytes reading from file -, link-type EN10MB (Ethernet), snapshot length 262144 tcpdump: pcap_loop: error reading dump file: Interrupted system call Skip the verbose_stats_dump() timer setup in this specific corner case for the time being and document it.
- Loading branch information