]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect/content-inspect: localize recursion counting
authorVictor Julien <vjulien@oisf.net>
Sun, 24 Sep 2023 04:51:33 +0000 (06:51 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 7 Dec 2023 08:56:59 +0000 (09:56 +0100)
commit4cce7ba48b5055eb48ec641ca8e980eb3d7e4b62
tree3db052358586604e35f28027635a837e9402d5ce
parent97f78e1b496adb2b00c35e73292c764221f814ee
detect/content-inspect: localize recursion counting

Use stack local var instead of DetectEngineThreadCtx member. Instead
setup a stack local struct that both counts and holds the limit. Make sure
the limit is a const so we can avoid rereading it.

This is part of an effort to reduce the size of the DetectEngineThreadCtx
structure and reduce the number of memory writes to it. Additionally, it
is part of an effect to reduce the number of places where detection
tracks various forms of state.
src/detect-engine-content-inspection.c
src/detect-tls-sni.c
src/detect.h
src/tests/detect-engine-content-inspection.c