When pcap_read_linux_mmap is called (e.g. via pcap_next or pcap_next_ex) right after pcap_setfilter, it doesn't respect the timeout (i.e. sometimes it returns without a packet before the timeout occurs). This happens because the call to poll might not occur when packets that were in the packet ring before the filter was applied are skipped. The attached patch seems to fix this issue.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Administrators of the "libpcap" SourceForge project have superseded this tracker item (formerly artifact 3602874, now bug 181) with issue 185 of the "libpcap" GitHub project.