mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-17 01:00:40 +01:00
bugfix: in 7.6.4, pri-based filters did not work correctly
messages were distributed to the wrong bins.
This commit is contained in:
parent
aabdd047c9
commit
b17a9e6f59
@ -1,4 +1,8 @@
|
||||
---------------------------------------------------------------------------
|
||||
Version 7.6.5 [v7.6-stable] 2014-09-17
|
||||
- bugfix: in 7.6.4, pri-based filters did not work correctly
|
||||
messages were distributed to the wrong bins.
|
||||
---------------------------------------------------------------------------
|
||||
Version 7.6.4 [v7.6-stable] 2014-09-12
|
||||
- add --enable-generate-man-pages configure switch (default: enabled)
|
||||
This forces generation of man pages, even if cached ones exists. This
|
||||
|
||||
@ -1512,7 +1512,10 @@ uchar *getMSG(msg_t * const pM)
|
||||
/* Get PRI value as integer */
|
||||
static int getPRIi(msg_t * const pM)
|
||||
{
|
||||
return (pM->iFacility << 3) + (pM->iSeverity);
|
||||
int pri = (pM->iFacility << 3) + (pM->iSeverity);
|
||||
if(pri > 191)
|
||||
pri = 191;
|
||||
return pri;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#endif
|
||||
/* define a macro missing on a few platforms */
|
||||
#undef LOG_FACMASK /* prevent redef warning ;) */
|
||||
#define LOG_FACMASK 191
|
||||
#define LOG_FACMASK 0xf8
|
||||
|
||||
/* we use RSTRUE/FALSE to prevent name claches with other packages */
|
||||
#define RSFALSE 0
|
||||
|
||||
@ -8,6 +8,11 @@ if ENABLE_IMDIAG
|
||||
TESTS += \
|
||||
stop-localvar.sh \
|
||||
stop-msgvar.sh \
|
||||
fac_authpriv.sh \
|
||||
fac_local0.sh \
|
||||
fac_mail.sh \
|
||||
fac_news.sh \
|
||||
fac_uucp.sh \
|
||||
rfc5424parser.sh \
|
||||
arrayqueue.sh \
|
||||
da-mainmsg-q.sh \
|
||||
@ -316,6 +321,16 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
|
||||
testsuites/stop-msgvar.conf \
|
||||
rfc5424parser.sh \
|
||||
testsuites/rfc5424parser.conf \
|
||||
fac_authpriv.sh \
|
||||
fac_authpriv.conf \
|
||||
fac_local0.sh \
|
||||
fac_local0.conf \
|
||||
fac_mail.sh \
|
||||
fac_mail.conf \
|
||||
fac_news.sh \
|
||||
fac_news.conf \
|
||||
fac_uucp.sh \
|
||||
fac_uucp.sh \
|
||||
rs_optimizer_pri.sh \
|
||||
testsuites/rs_optimizer_pri.conf \
|
||||
rscript_prifilt.sh \
|
||||
|
||||
11
tests/fac_authpriv.sh
Executable file
11
tests/fac_authpriv.sh
Executable file
@ -0,0 +1,11 @@
|
||||
# This tests proper processing of the authpriv facility.
|
||||
# added 2014-09-16 by Rgerhards
|
||||
|
||||
# This file is part of the rsyslog project, released under ASL 2.0
|
||||
source $srcdir/diag.sh init
|
||||
source $srcdir/diag.sh startup fac_authpriv.conf
|
||||
source $srcdir/diag.sh tcpflood -m1000 -P 81
|
||||
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
||||
source $srcdir/diag.sh wait-shutdown # and wait for it to terminate
|
||||
source $srcdir/diag.sh seq-check 0 999
|
||||
source $srcdir/diag.sh exit
|
||||
10
tests/fac_local0.sh
Executable file
10
tests/fac_local0.sh
Executable file
@ -0,0 +1,10 @@
|
||||
# added 2014-09-17 by Rgerhards
|
||||
|
||||
# This file is part of the rsyslog project, released under ASL 2.0
|
||||
source $srcdir/diag.sh init
|
||||
source $srcdir/diag.sh startup fac_local0.conf
|
||||
source $srcdir/diag.sh tcpflood -m1000 -P 129
|
||||
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
||||
source $srcdir/diag.sh wait-shutdown # and wait for it to terminate
|
||||
source $srcdir/diag.sh seq-check 0 999
|
||||
source $srcdir/diag.sh exit
|
||||
10
tests/fac_mail.sh
Executable file
10
tests/fac_mail.sh
Executable file
@ -0,0 +1,10 @@
|
||||
# added 2014-09-17 by Rgerhards
|
||||
|
||||
# This file is part of the rsyslog project, released under ASL 2.0
|
||||
source $srcdir/diag.sh init
|
||||
source $srcdir/diag.sh startup fac_mail.conf
|
||||
source $srcdir/diag.sh tcpflood -m1000 -P 17
|
||||
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
||||
source $srcdir/diag.sh wait-shutdown # and wait for it to terminate
|
||||
source $srcdir/diag.sh seq-check 0 999
|
||||
source $srcdir/diag.sh exit
|
||||
10
tests/fac_news.sh
Executable file
10
tests/fac_news.sh
Executable file
@ -0,0 +1,10 @@
|
||||
# added 2014-09-17 by Rgerhards
|
||||
|
||||
# This file is part of the rsyslog project, released under ASL 2.0
|
||||
source $srcdir/diag.sh init
|
||||
source $srcdir/diag.sh startup fac_news.conf
|
||||
source $srcdir/diag.sh tcpflood -m1000 -P 57
|
||||
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
||||
source $srcdir/diag.sh wait-shutdown # and wait for it to terminate
|
||||
source $srcdir/diag.sh seq-check 0 999
|
||||
source $srcdir/diag.sh exit
|
||||
10
tests/fac_uucp.sh
Executable file
10
tests/fac_uucp.sh
Executable file
@ -0,0 +1,10 @@
|
||||
# added 2014-09-17 by Rgerhards
|
||||
|
||||
# This file is part of the rsyslog project, released under ASL 2.0
|
||||
source $srcdir/diag.sh init
|
||||
source $srcdir/diag.sh startup fac_uucp.conf
|
||||
source $srcdir/diag.sh tcpflood -m1000 -P 65
|
||||
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
||||
source $srcdir/diag.sh wait-shutdown # and wait for it to terminate
|
||||
source $srcdir/diag.sh seq-check 0 999
|
||||
source $srcdir/diag.sh exit
|
||||
7
tests/testsuites/fac_authpriv.conf
Normal file
7
tests/testsuites/fac_authpriv.conf
Normal file
@ -0,0 +1,7 @@
|
||||
$IncludeConfig diag-common.conf
|
||||
|
||||
$ModLoad ../plugins/imtcp/.libs/imtcp
|
||||
$InputTCPServerRun 13514
|
||||
|
||||
$template outfmt,"%msg:F,58:2%,%msg:F,58:3%,%msg:F,58:4%\n"
|
||||
authpriv.* ./rsyslog.out.log;outfmt
|
||||
8
tests/testsuites/fac_local0.conf
Normal file
8
tests/testsuites/fac_local0.conf
Normal file
@ -0,0 +1,8 @@
|
||||
$IncludeConfig diag-common.conf
|
||||
|
||||
module(load="../plugins/imtcp/.libs/imtcp")
|
||||
input(type="imtcp" port="13514")
|
||||
|
||||
template(type="string" name="outfmt" string="%msg:F,58:2%,%msg:F,58:3%,%msg:F,58:4%\n")
|
||||
if $syslogfacility-text == "local0" then
|
||||
action(type="omfile" file="rsyslog.out.log" template="outfmt")
|
||||
7
tests/testsuites/fac_mail.conf
Normal file
7
tests/testsuites/fac_mail.conf
Normal file
@ -0,0 +1,7 @@
|
||||
$IncludeConfig diag-common.conf
|
||||
|
||||
module(load="../plugins/imtcp/.libs/imtcp")
|
||||
input(type="imtcp" port="13514")
|
||||
|
||||
template(type="string" name="outfmt" string="%msg:F,58:2%,%msg:F,58:3%,%msg:F,58:4%\n")
|
||||
mail.* action(type="omfile" file="rsyslog.out.log" template="outfmt")
|
||||
8
tests/testsuites/fac_news.conf
Normal file
8
tests/testsuites/fac_news.conf
Normal file
@ -0,0 +1,8 @@
|
||||
$IncludeConfig diag-common.conf
|
||||
|
||||
module(load="../plugins/imtcp/.libs/imtcp")
|
||||
input(type="imtcp" port="13514")
|
||||
|
||||
template(type="string" name="outfmt" string="%msg:F,58:2%,%msg:F,58:3%,%msg:F,58:4%\n")
|
||||
if prifilt("news.*") then
|
||||
action(type="omfile" file="rsyslog.out.log" template="outfmt")
|
||||
7
tests/testsuites/fac_uucp.conf
Normal file
7
tests/testsuites/fac_uucp.conf
Normal file
@ -0,0 +1,7 @@
|
||||
$IncludeConfig diag-common.conf
|
||||
|
||||
module(load="../plugins/imtcp/.libs/imtcp")
|
||||
input(type="imtcp" port="13514")
|
||||
|
||||
template(type="string" name="outfmt" string="%msg:F,58:2%,%msg:F,58:3%,%msg:F,58:4%\n")
|
||||
uucp.* action(type="omfile" file="rsyslog.out.log" template="outfmt")
|
||||
Loading…
x
Reference in New Issue
Block a user