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/2857/head
Eric Leblond 9 years ago committed by Victor Julien
parent 2979a0a2e1
commit cc82ef065c

@ -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