diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-19 11:43:51 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-19 11:43:51 +0100 |
commit | 86f233164f83fdccc54021dd4e81ef5a4a22c9e8 (patch) | |
tree | c67083359f75b6fb22d88298a8565a7963105c69 | |
parent | 75d2503bb71905f0c37d5228afa26b43bcb575f0 (diff) | |
parent | 496fad48bc87e2064fb9154d89c12bdf6eb67cbb (diff) | |
download | rsyslog-86f233164f83fdccc54021dd4e81ef5a4a22c9e8.tar.gz rsyslog-86f233164f83fdccc54021dd4e81ef5a4a22c9e8.tar.bz2 rsyslog-86f233164f83fdccc54021dd4e81ef5a4a22c9e8.zip |
Merge branch 'v7-devel'
Conflicts:
ChangeLog
-rw-r--r-- | ChangeLog | 28 | ||||
-rw-r--r-- | grammar/rainerscript.c | 4 | ||||
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rwxr-xr-x | tests/stop-localvar.sh | 12 | ||||
-rw-r--r-- | tests/testsuites/stop-localvar.conf | 21 |
5 files changed, 55 insertions, 11 deletions
@@ -7,6 +7,8 @@ Version 8.1.1 [devel] 2013-11-?? Thanks to Pavel Levshin for alerting us. - bugfix: mmsequence: instance mode did not work Thanks to Pavel Levshin for the patch +- bugfix: segfault on startup when certain script constructs are used + e.g. "if not $msg ..." - omhiredis: now supports v8 output module interface and works again Thanks to Pavel Levshin for the patch - mmaudit: now supports v8 output module interface and work again @@ -37,7 +39,9 @@ Version 8.1.0 [devel] 2013-11-15 statement. Also, it can still be build without problems, the option must just explicitely be given. --------------------------------------------------------------------------- -Version 7.5.7 [devel] 2013-11-?? +Version 7.5.7 [v7-devel] 2013-11-?? +- bugfix: segfault on startup when certain script constructs are used + e.g. "if not $msg ..." - bugfix: ommysql lost configfile/section parameters after first close This means that when a connection was broken, it was probably re-instantiated with different parameters than configured. @@ -61,16 +65,6 @@ Version 7.5.7 [devel] 2013-11-?? - bugfix: $SystemLogUseSysTimeStamp/$SystemLogUsePIDFromSystem did not work Thanks to Tomas Heinrich for the patch. --------------------------------------------------------------------------- -Version 7.4.7 [v7.4-stable] 2013-11-?? -- bugfix: imuxsock: UseSysTimeStamp config parameter did not work correctly - Thanks to Tomas Heinrich for alerting us and provinding a solution - suggestion. -- bugfix: $SystemLogUseSysTimeStamp/$SystemLogUsePIDFromSystem did not work - Thanks to Tomas Heinrich for the patch. -- improved checking of queue config parameters on startup -- bugfix: call to ruleset with async queue did not use the queue - closes: http://bugzilla.adiscon.com/show_bug.cgi?id=443 ---------------------------------------------------------------------------- Version 7.5.6 [devel] 2013-10-29 - impstats: add capability to bind to a ruleset - improved performance of RainerScript variable access @@ -267,6 +261,18 @@ Version 7.5.0 [devel] 2013-06-11 connections Thanks to Axel Rau for the patch. --------------------------------------------------------------------------- +Version 7.4.7 [v7.4-stable] 2013-11-?? +- bugfix: segfault on startup when certain script constructs are used + e.g. "if not $msg ..." +- bugfix: imuxsock: UseSysTimeStamp config parameter did not work correctly + Thanks to Tomas Heinrich for alerting us and provinding a solution + suggestion. +- bugfix: $SystemLogUseSysTimeStamp/$SystemLogUsePIDFromSystem did not work + Thanks to Tomas Heinrich for the patch. +- improved checking of queue config parameters on startup +- bugfix: call to ruleset with async queue did not use the queue + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=443 +--------------------------------------------------------------------------- Version 7.4.6 [v7.4-stable] 2013-10-31 - bugfix: potential abort during HUP This could happen when one of imklog, imzmq3, imkmsg, impstats, diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index 0c695934..cc44bd3f 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -2881,6 +2881,9 @@ cnfexprOptimize_CMP_severity_facility(struct cnfexpr *expr) { struct cnffunc *func; + if(expr->l->nodetype != 'V') + FINALIZE; + if(!strcmp("$syslogseverity", ((struct cnfvar*)expr->l)->name)) { if(expr->r->nodetype == 'N') { int sev = (int) ((struct cnfnumval*)expr->r)->val; @@ -2910,6 +2913,7 @@ cnfexprOptimize_CMP_severity_facility(struct cnfexpr *expr) } } } +finalize_it: return expr; } diff --git a/tests/Makefile.am b/tests/Makefile.am index 954e9ae3..72b888ec 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -6,6 +6,7 @@ TESTS = $(TESTRUNS) if ENABLE_IMDIAG TESTS += \ + stop-localvar.sh \ arrayqueue.sh \ global_vars.sh \ da-mainmsg-q.sh \ diff --git a/tests/stop-localvar.sh b/tests/stop-localvar.sh new file mode 100755 index 00000000..91573013 --- /dev/null +++ b/tests/stop-localvar.sh @@ -0,0 +1,12 @@ +# Test for "stop" statement +# This file is part of the rsyslog project, released under ASL 2.0 +echo =============================================================================== +echo \[stop-localvar.sh\]: testing stop statement together with local variables +source $srcdir/diag.sh init +source $srcdir/diag.sh startup stop-localvar.conf +sleep 1 +source $srcdir/diag.sh tcpflood -m2000 -i1 +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh wait-shutdown +source $srcdir/diag.sh seq-check 100 999 +source $srcdir/diag.sh exit diff --git a/tests/testsuites/stop-localvar.conf b/tests/testsuites/stop-localvar.conf new file mode 100644 index 00000000..020ebd87 --- /dev/null +++ b/tests/testsuites/stop-localvar.conf @@ -0,0 +1,21 @@ +/* note: variables are strings (at least in v7), so we need to convert + * to a number when we check the conditon. + * Even if we change the variable representation at some later point, + * we should NOT change this test here, but better add a new one. + * rgerhards, 2013-11-19 + */ +$IncludeConfig diag-common.conf +template(name="outfmt" type="string" string="%$!nbr%\n") + +module(load="../plugins/imtcp/.libs/imtcp") +input(type="imtcp" port="13514") + +if $msg contains "msgnum:" then { + set $!nbr = field($msg, 58, 2); + if cnum($!nbr) < 100 then + stop + /* check is intentionally more complex than needed! */ + else if not (cnum($!nbr) > 999) then { + action(type="omfile" file="rsyslog.out.log" template="outfmt") + } +} |