]> git.ipfire.org Git - people/ms/suricata.git/commit
Fix pcap packet acquisition methods
authorVictor Julien <victor@inliniac.net>
Fri, 25 Jul 2014 11:47:59 +0000 (13:47 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 25 Jul 2014 11:47:59 +0000 (13:47 +0200)
commitb5d3b7e92ad1e712950eba5aa822df6d691e6af5
tree231e8050c1758e29947ba7ecf9148f0edbfd89cc
parent0dd16461cf120238dbcb76ea3e405676ccb60b46
Fix pcap packet acquisition methods

Fix pcap packet acquisition methods passing 0 to pcap_dispatch.
Previously they passed the packet pool size, but the packet_q_len
variable was now hardcoded at 0.

This patch sets packet_q_len to 64. If packet pool is empty, we fall
back to direct alloc. As the pcap_dispatch function is only called
when packet pool is not empty, we alloc at most 63 packets.
src/source-pcap-file.c
src/source-pcap.c