From: Victor Julien Date: Fri, 5 Mar 2021 09:55:45 +0000 (+0100) Subject: eve/ike: gracefully handle renamed output config X-Git-Tag: suricata-7.0.0-beta1~1728 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5959%2Fhead;p=thirdparty%2Fsuricata.git eve/ike: gracefully handle renamed output config --- diff --git a/src/runmodes.c b/src/runmodes.c index 23c883bab2..3fa436a15e 100644 --- a/src/runmodes.c +++ b/src/runmodes.c @@ -638,11 +638,17 @@ static void RunModeInitializeEveOutput(ConfNode *conf, OutputCtx *parent_ctx) ConfNode *type = NULL; TAILQ_FOREACH(type, &types->head, next) { - SCLogConfig("enabling 'eve-log' module '%s'", type->val); - int sub_count = 0; char subname[256]; - snprintf(subname, sizeof(subname), "eve-log.%s", type->val); + + if (strcmp(type->val, "ikev2") == 0) { + SCLogWarning(SC_ERR_INVALID_ARGUMENT, "eve module 'ikev2' has been replaced by 'ike'"); + strlcpy(subname, "eve-log.ike", sizeof(subname)); + } else { + snprintf(subname, sizeof(subname), "eve-log.%s", type->val); + } + + SCLogConfig("enabling 'eve-log' module '%s'", type->val); ConfNode *sub_output_config = ConfNodeLookupChild(type, type->val); if (sub_output_config != NULL) {