af-packet: optimize BPF

This patch turn on code optimization on BPF filter building by
libpcap. This allow to reduce the size of the BPF bytecode and
thus increase the size of BPF filter supported by Suricata.

Reported-by: Martijn van Oosterhout
pull/2926/head
Eric Leblond 9 years ago committed by Victor Julien
parent 020d9abb0e
commit 49514082b4

@ -2085,7 +2085,7 @@ TmEcode AFPSetBPFFilter(AFPThreadVars *ptv)
ptv->datalink, /* linktype_arg */
&filter, /* program */
ptv->bpf_filter, /* const char *buf */
0, /* optimize */
1, /* optimize */
0 /* mask */
) == -1) {
SCLogError(SC_ERR_AFP_CREATE, "Filter compilation failed.");

Loading…
Cancel
Save