From: Juliana Fajardini Date: Mon, 20 Mar 2023 13:44:19 +0000 (-0300) Subject: flow: make exc policy work w/ simulated flowmemcap X-Git-Tag: suricata-7.0.0-rc2~317 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1665f71a68e4c0ecf01b37d47c293aa8be48af07;p=thirdparty%2Fsuricata.git flow: make exc policy work w/ simulated flowmemcap Exception policy wouldn't be applied if we were in the context of a simulated flow memcap hit. Bug #5998 --- diff --git a/src/flow-hash.c b/src/flow-hash.c index 351494bb97..1bac58a3ee 100644 --- a/src/flow-hash.c +++ b/src/flow-hash.c @@ -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