]> 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>
Sat, 16 Feb 2019 13:58:18 +0000 (14:58 +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 4c13f5a73726929abfa0013b3257b3d7b59d9041..bcbf34e4dcab83f76cc7cfe66ebff5584ac0d5ad 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);