af-packet: invert ebpf g_flowv4_ok log flag

Fix how error messages are printed in a case error occurs in the ebpf
flow table code. The log flag g_flowv4_ok was inverted,
so the error messages were never printed.

The fix follows g_flowv6_ok flag code structure.

Ticket: 8704
pull/15789/head
Adam Kiripolsky 4 months ago committed by Victor Julien
parent 6cbf511f65
commit 74bc0feb1a

@ -2594,9 +2594,9 @@ TmEcode ReceiveAFPThreadInit(ThreadVars *tv, const void *initdata, void **data)
if (ptv->flags & (AFP_BYPASS|AFP_XDPBYPASS)) {
ptv->v4_map_fd = EBPFGetMapFDByName(ptv->iface, "flow_table_v4");
if (ptv->v4_map_fd == -1) {
if (!g_flowv4_ok) {
if (g_flowv4_ok) {
SCLogError("Can't find eBPF map fd for '%s'", "flow_table_v4");
g_flowv4_ok = true;
g_flowv4_ok = false;
}
}
ptv->v6_map_fd = EBPFGetMapFDByName(ptv->iface, "flow_table_v6");

Loading…
Cancel
Save