suricata: avoid at exit crash in nfq mode

When Suricata was build with ebpf support and when it was started
in NFQ mode, it was crashing at exit because it was trying to free
the device extension.

This patch fixes the issue by only trigger the eBPF related code
when Suricata is running in AFP_PACKET mode.
pull/5784/head
Eric Leblond 5 years ago committed by Victor Julien
parent e6cfcb704c
commit 85327890f5

@ -2479,8 +2479,10 @@ int PostConfLoadedSetup(SCInstance *suri)
StorageInit();
#ifdef HAVE_PACKET_EBPF
EBPFRegisterExtension();
LiveDevRegisterExtension();
if (suri->run_mode == RUNMODE_AFP_DEV) {
EBPFRegisterExtension();
LiveDevRegisterExtension();
}
#endif
RegisterFlowBypassInfo();

Loading…
Cancel
Save