]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
dpdk: fix thread slot assignment
authorLukas Sismis <lsismis@oisf.net>
Sat, 23 Mar 2024 22:11:16 +0000 (23:11 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 10 Apr 2024 05:03:07 +0000 (07:03 +0200)
Commit 5592ec07 introduced a bug where ptv->slot was
assigned with the current one instead of the next one
in the list. This caused a Suricata crash in the DPDK mode.

Ticket: 6877

src/source-dpdk.c

index 6bf5917c32b9f0efad639cd909fd64bfd2918630..d6720fa831982f211805f4add525c7daa9fd1df0 100644 (file)
@@ -568,7 +568,7 @@ static TmEcode ReceiveDPDKLoop(ThreadVars *tv, void *data, void *slot)
 {
     SCEnter();
     DPDKThreadVars *ptv = (DPDKThreadVars *)data;
-    ptv->slot = (TmSlot *)slot;
+    ptv->slot = ((TmSlot *)slot)->slot_next;
     TmEcode ret = ReceiveDPDKLoopInit(tv, ptv);
     if (ret != TM_ECODE_OK) {
         SCReturnInt(ret);