Blame SOURCES/rsyslog-8.2102.0-rhbz1984616-imuxsock-ratelimit.patch
|
|
d1fb5e |
diff -up rsyslog-8.2102.0/runtime/ratelimit.c.orig rsyslog-8.2102.0/runtime/ratelimit.c
|
|
|
d1fb5e |
--- rsyslog-8.2102.0/runtime/ratelimit.c.orig 2021-07-27 10:37:50.972903104 +0200
|
|
|
d1fb5e |
+++ rsyslog-8.2102.0/runtime/ratelimit.c 2021-07-27 10:38:26.141002988 +0200
|
|
|
d1fb5e |
@@ -235,7 +235,6 @@ ratelimitMsg(ratelimit_t *__restrict__ c
|
|
|
d1fb5e |
{
|
|
|
d1fb5e |
DEFiRet;
|
|
|
d1fb5e |
rsRetVal localRet;
|
|
|
d1fb5e |
- int severity = 0;
|
|
|
d1fb5e |
|
|
|
d1fb5e |
*ppRepMsg = NULL;
|
|
|
d1fb5e |
|
|
|
d1fb5e |
@@ -246,13 +245,12 @@ ratelimitMsg(ratelimit_t *__restrict__ c
|
|
|
d1fb5e |
DBGPRINTF("Message discarded, parsing error %d\n", localRet);
|
|
|
d1fb5e |
ABORT_FINALIZE(RS_RET_DISCARDMSG);
|
|
|
d1fb5e |
}
|
|
|
d1fb5e |
- severity = pMsg->iSeverity;
|
|
|
d1fb5e |
}
|
|
|
d1fb5e |
}
|
|
|
d1fb5e |
|
|
|
d1fb5e |
/* Only the messages having severity level at or below the
|
|
|
d1fb5e |
* treshold (the value is >=) are subject to ratelimiting. */
|
|
|
d1fb5e |
- if(ratelimit->interval && (severity >= ratelimit->severity)) {
|
|
|
d1fb5e |
+ if(ratelimit->interval && (pMsg->iSeverity >= ratelimit->severity)) {
|
|
|
d1fb5e |
char namebuf[512]; /* 256 for FGDN adn 256 for APPNAME should be enough */
|
|
|
d1fb5e |
snprintf(namebuf, sizeof namebuf, "%s:%s", getHOSTNAME(pMsg),
|
|
|
d1fb5e |
getAPPNAME(pMsg, 0));
|