39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
From f2bac98f2ada404fb8ed9bc10ff13bfb72366abd Mon Sep 17 00:00:00 2001
|
|
From: Rainer Gerhards <rgerhards@adiscon.com>
|
|
Date: Fri, 9 Jun 2023 14:37:26 +0200
|
|
Subject: [PATCH] mmnormalize bugfix: if msg cannot be parsed, parser chain is
|
|
stopped
|
|
|
|
When an parser is not able to parse a message, it should indicate this
|
|
to rsyslog core, which then activates the next parser(s) inside the
|
|
configured parser chain.
|
|
|
|
Unfortunatley, mmnormalize always tells core "success", and so no
|
|
other parsers are activated.
|
|
|
|
closes https://github.com/rsyslog/rsyslog/issues/5148
|
|
|
|
Reference:https://github.com/rsyslog/rsyslog/commit/f2bac98f2ada404fb8ed9bc10ff13bfb72366abd
|
|
Conflict:NA
|
|
---
|
|
plugins/pmnormalize/pmnormalize.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/plugins/pmnormalize/pmnormalize.c b/plugins/pmnormalize/pmnormalize.c
|
|
index e1a89841bc..4d3ad76e49 100644
|
|
--- a/plugins/pmnormalize/pmnormalize.c
|
|
+++ b/plugins/pmnormalize/pmnormalize.c
|
|
@@ -234,10 +234,11 @@ CODESTARTparse2
|
|
"json: %s\n", r, fjson_object_to_json_string(json));
|
|
}
|
|
fjson_object_put(json);
|
|
+ ABORT_FINALIZE(RS_RET_COULD_NOT_PARSE);
|
|
} else {
|
|
iRet = MsgSetPropsViaJSON_Object(pMsg, json);
|
|
}
|
|
-
|
|
+finalize_it:
|
|
ENDparse2
|
|
|
|
|