From 03af3e1ed8aacf34d44b242a507d623352dc10a8 Mon Sep 17 00:00:00 2001 From: Alexander Gozman Date: Fri, 21 Dec 2018 16:16:29 +0000 Subject: [PATCH] nfqueue: inject fake packet on timeout Fixes nfqueue and delayed-detect. On systems with small amount of traffic (or with no traffic at all) nfqueue with 'delayed-detect' enabled hanged in 'workers' mode. Bug #2362. --- src/source-nfq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/source-nfq.c b/src/source-nfq.c index 3680c06e45..81886f4ea3 100644 --- a/src/source-nfq.c +++ b/src/source-nfq.c @@ -916,6 +916,9 @@ static void NFQRecvPkt(NFQQueueVars *t, NFQThreadVars *tv) /* no error on timeout */ if (flag) NFQVerdictCacheFlush(t); + + /* inject a fake packet on timeout */ + TmThreadsCaptureInjectPacket(tv->tv, tv->slot, NULL); } else { #ifdef COUNTERS NFQMutexLock(t);