From 75e57dde7c147423a299a4d8e63a8d48b7bd22cd Mon Sep 17 00:00:00 2001 From: Juliana Fajardini Date: Mon, 20 Mar 2023 10:44:19 -0300 Subject: [PATCH] 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 (cherry picked from commit 1665f71a68e4c0ecf01b37d47c293aa8be48af07) --- src/flow-hash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/flow-hash.c b/src/flow-hash.c index 32226db4ee..c9cb8964bd 100644 --- a/src/flow-hash.c +++ b/src/flow-hash.c @@ -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 -- 2.47.2