From: Victor Julien Date: Wed, 8 Jun 2016 06:57:29 +0000 (+0200) Subject: detect: get proper legacy custom values. Issue #1804 X-Git-Tag: suricata-3.1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a88359dcf099b16c2085f11c0159160c6835e88a;p=thirdparty%2Fsuricata.git detect: get proper legacy custom values. Issue #1804 --- diff --git a/src/detect-engine.c b/src/detect-engine.c index 12dfb49973..3d35fb08de 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -1105,10 +1105,18 @@ static int DetectEngineCtxLoadConf(DetectEngineCtx *de_ctx) if (de_ctx_custom != NULL) { TAILQ_FOREACH(opt, &de_ctx_custom->head, next) { if (strcmp(opt->val, "custom-values") == 0) { + if (max_uniq_toclient_groups_str == NULL) { + max_uniq_toclient_groups_str = (char *)ConfNodeLookupChildValue + (opt->head.tqh_first, "toclient-sp-groups"); + } if (max_uniq_toclient_groups_str == NULL) { max_uniq_toclient_groups_str = (char *)ConfNodeLookupChildValue (opt->head.tqh_first, "toclient-groups"); } + if (max_uniq_toserver_groups_str == NULL) { + max_uniq_toserver_groups_str = (char *)ConfNodeLookupChildValue + (opt->head.tqh_first, "toserver-dp-groups"); + } if (max_uniq_toserver_groups_str == NULL) { max_uniq_toserver_groups_str = (char *)ConfNodeLookupChildValue (opt->head.tqh_first, "toserver-groups"); @@ -1131,6 +1139,8 @@ static int DetectEngineCtxLoadConf(DetectEngineCtx *de_ctx) } else { de_ctx->max_uniq_toclient_groups = 20; } + SCLogConfig("toclient-groups %u", de_ctx->max_uniq_toclient_groups); + if (max_uniq_toserver_groups_str != NULL) { if (ByteExtractStringUint16(&de_ctx->max_uniq_toserver_groups, 10, strlen(max_uniq_toserver_groups_str), @@ -1146,6 +1156,7 @@ static int DetectEngineCtxLoadConf(DetectEngineCtx *de_ctx) } else { de_ctx->max_uniq_toserver_groups = 40; } + SCLogConfig("toserver-groups %u", de_ctx->max_uniq_toserver_groups); break; /* Default (or no config provided) is profile medium */