1. Add key (commented) to suricata.yaml
2. Give the configured/default key preference, save a check
static inline StreamingBufferRegion *InitBufferRegion(
StreamingBuffer *sb, const StreamingBufferConfig *cfg, const uint32_t min_size)
{
- if (sb->regions == USHRT_MAX || (cfg->max_regions != 0 && sb->regions >= cfg->max_regions)) {
+ if ((cfg->max_regions != 0 && sb->regions >= cfg->max_regions) || (sb->regions == UINT16_MAX)) {
SCLogDebug("max regions reached");
sc_errno = SC_ELIMIT;
return NULL;
# # is used or when stream-event:reassembly_overlap_different_data;
# # is used in a rule.
#
+# max-regions: 8 # maximum number of concurrent regions per streaming buffer
+# # defaults to 8, if no configuration was provided. 0 means no limit.
+
stream:
memcap: 64 MiB
#memcap-policy: ignore