]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: make exc policy work w/ simulated flowmemcap 8795/head
authorJuliana Fajardini <jufajardini@oisf.net>
Mon, 20 Mar 2023 13:44:19 +0000 (10:44 -0300)
committerVictor Julien <vjulien@oisf.net>
Tue, 2 May 2023 08:08:23 +0000 (10:08 +0200)
Exception policy wouldn't be applied if we were in the context of a
simulated flow memcap hit.

Bug #5998

(cherry picked from commit 1665f71a68e4c0ecf01b37d47c293aa8be48af07)

src/flow-hash.c

index 32226db4ee51d0eae0db2a08928990c73dfb585c..c9cb8964bd67c6a5ee271a06a50b4d3600979ba7 100644 (file)
@@ -541,6 +541,8 @@ static Flow *FlowGetNew(ThreadVars *tv, FlowLookupStruct *fls, Packet *p)
     const bool emerg = ((SC_ATOMIC_GET(flow_flags) & FLOW_EMERGENCY) != 0);
 #ifdef DEBUG
     if (g_eps_flow_memcap != UINT64_MAX && g_eps_flow_memcap == p->pcap_cnt) {
+        NoFlowHandleIPS(p);
+        StatsIncr(tv, fls->dtv->counter_flow_memcap);
         return NULL;
     }
 #endif