detect: get proper legacy custom values. Issue #1804

pull/2143/head
Victor Julien 9 years ago
parent 5c974f92a8
commit a88359dcf0

@ -1105,10 +1105,18 @@ static int DetectEngineCtxLoadConf(DetectEngineCtx *de_ctx)
if (de_ctx_custom != NULL) { if (de_ctx_custom != NULL) {
TAILQ_FOREACH(opt, &de_ctx_custom->head, next) { TAILQ_FOREACH(opt, &de_ctx_custom->head, next) {
if (strcmp(opt->val, "custom-values") == 0) { 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) { if (max_uniq_toclient_groups_str == NULL) {
max_uniq_toclient_groups_str = (char *)ConfNodeLookupChildValue max_uniq_toclient_groups_str = (char *)ConfNodeLookupChildValue
(opt->head.tqh_first, "toclient-groups"); (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) { if (max_uniq_toserver_groups_str == NULL) {
max_uniq_toserver_groups_str = (char *)ConfNodeLookupChildValue max_uniq_toserver_groups_str = (char *)ConfNodeLookupChildValue
(opt->head.tqh_first, "toserver-groups"); (opt->head.tqh_first, "toserver-groups");
@ -1131,6 +1139,8 @@ static int DetectEngineCtxLoadConf(DetectEngineCtx *de_ctx)
} else { } else {
de_ctx->max_uniq_toclient_groups = 20; 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 (max_uniq_toserver_groups_str != NULL) {
if (ByteExtractStringUint16(&de_ctx->max_uniq_toserver_groups, 10, if (ByteExtractStringUint16(&de_ctx->max_uniq_toserver_groups, 10,
strlen(max_uniq_toserver_groups_str), strlen(max_uniq_toserver_groups_str),
@ -1146,6 +1156,7 @@ static int DetectEngineCtxLoadConf(DetectEngineCtx *de_ctx)
} else { } else {
de_ctx->max_uniq_toserver_groups = 40; de_ctx->max_uniq_toserver_groups = 40;
} }
SCLogConfig("toserver-groups %u", de_ctx->max_uniq_toserver_groups);
break; break;
/* Default (or no config provided) is profile medium */ /* Default (or no config provided) is profile medium */

Loading…
Cancel
Save