mirror of https://github.com/OISF/suricata
bpf: refactor the BPF code and postpone querying of the engine mode
BPF codebase queried engine mode earlier than it was determined from the configuration file/command line. As a result it used the default (IDS) mode where it could've been configured later on to the IPS mode. This could lead into an undefined behavior as some Suricata modules behave according to the engine mode. PF-Ring, Netmap and AF-Packet all shared almost identical code for determining the engine mode. It was put into one common function. Omitted the usage of SCStrdup function in PF-Ring module as it is uppercased during thread initialization phase. Ticket: #5958pull/8810/head
parent
fe45258fbd
commit
f08de8ea2e
Loading…
Reference in New Issue