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