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.
(cherry picked from commit
85327890f5bb3b9521a2dfb8268ace6645d02f72)
StorageInit();
#ifdef HAVE_PACKET_EBPF
- EBPFRegisterExtension();
- LiveDevRegisterExtension();
+ if (suri->run_mode == RUNMODE_AFP_DEV) {
+ EBPFRegisterExtension();
+ LiveDevRegisterExtension();
+ }
#endif
RegisterFlowBypassInfo();
AppLayerSetup();