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

Bug #5998

src/flow-hash.c

index 351494bb977401f6d01930c99a5b7533ee11488d..1bac58a3ee617905bb8d0bd72df3ae2793523640 100644 (file)
@@ -621,6 +621,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