]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
nfqueue: inject fake packet on timeout
authorAlexander Gozman <a.gozman@securitycode.ru>
Fri, 21 Dec 2018 16:16:29 +0000 (16:16 +0000)
committerVictor Julien <victor@inliniac.net>
Fri, 18 Jan 2019 09:15:27 +0000 (10:15 +0100)
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

index 3680c06e45616f640c22f07c13a4c86f3da59e25..81886f4ea373281d9fd72f5f2e912aee199b7ce2 100644 (file)
@@ -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);