source-pcap-file: honor bpf filter on command line

When a BPF filter is given on the command line when reading a
pcap file, the BPF filter is not honored.

The regression has been introduced in:

commit 3ab9120821
Author: Dana Helwig <dana.helwig@protectwise.com>
Date:   Thu Apr 27 11:17:16 2017 -0600

    source-pcap-file: Pcap Directory Mode (Feature #2222)

Reported-By: Tim Colin <tcolin@et.esiea.fr>
pull/4393/head
Eric Leblond 6 years ago committed by Victor Julien
parent 860f43753c
commit 54d3620662

@ -263,10 +263,9 @@ TmEcode ReceivePcapFileThreadInit(ThreadVars *tv, const void *initdata, void **d
SCReturnInt(TM_ECODE_OK);
}
pv->shared = &ptv->shared;
status = InitPcapFile(pv);
if(status == TM_ECODE_OK) {
pv->shared = &ptv->shared;
ptv->is_directory = 0;
ptv->behavior.file = pv;
} else {

Loading…
Cancel
Save