diff --git a/src/runmodes.c b/src/runmodes.c index ca72e53e1f..acb1b6c7d6 100644 --- a/src/runmodes.c +++ b/src/runmodes.c @@ -662,6 +662,22 @@ static void RunModeInitializeEveOutput(ConfNode *conf, OutputCtx *parent_ctx) /* Error is no registered loggers with this name * were found .*/ if (!sub_count) { +#ifndef HAVE_RUST + const char *rust_types[] = { "eve-log.smb", "eve-log.nfs", + "eve-log.dhcp", "eve-log.krb5", "eve-log.ikev2", + "eve-log.tftp", NULL, }; + const char **iter = rust_types; + bool is_rust = false; + while (*iter) { + is_rust |= (strcmp(*iter, subname) == 0); + iter++; + } + if (is_rust) { + SCLogWarning(SC_WARN_RUST_NOT_AVAILABLE, "output " + "module '%s' depends on Rust support", subname); + continue; + } +#endif FatalErrorOnInit(SC_ERR_INVALID_ARGUMENT, "No output module named %s", subname); continue; diff --git a/src/util-error.c b/src/util-error.c index 7fc7dd6f17..ecdfe57d3f 100644 --- a/src/util-error.c +++ b/src/util-error.c @@ -356,6 +356,7 @@ const char * SCErrorToString(SCError err) CASE_CODE (SC_ERR_WINDIVERT_NOSUPPORT); CASE_CODE (SC_ERR_WINDIVERT_INVALID_FILTER); CASE_CODE (SC_ERR_WINDIVERT_TOOLONG_FILTER); + CASE_CODE (SC_WARN_RUST_NOT_AVAILABLE); CASE_CODE (SC_ERR_MAX); } diff --git a/src/util-error.h b/src/util-error.h index 8e9015753f..cfa74b0212 100644 --- a/src/util-error.h +++ b/src/util-error.h @@ -346,6 +346,7 @@ typedef enum { SC_ERR_WINDIVERT_NOSUPPORT, SC_ERR_WINDIVERT_INVALID_FILTER, SC_ERR_WINDIVERT_TOOLONG_FILTER, + SC_WARN_RUST_NOT_AVAILABLE, SC_ERR_MAX, } SCError;