From cdb58f8d913dc47b01f61f5a72a83ce6aea26623 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 21 Aug 2009 15:13:47 +0200 Subject: bugfix: strings improperly reused ... resulting in some message properties be populated with strings from previous messages. This was caused by an improper predicate check. --- ChangeLog | 3 +++ runtime/prop.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bde56d58..334fbad7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,9 @@ Version 5.1.5 [DEVEL] (rgerhards), 2009-08-?? malformed, thus causing them to be treated as TAG (this was a regression introduced from the "rfc3164 strict" change in 4.5.0). Testbench has been updated to include a smaple message with a hostname containing a dash. +- bugfix: strings improperly reused, resulting in some message properties + be populated with strings from previous messages. This was caused by + an improper predicate check. --------------------------------------------------------------------------- Version 5.1.4 [DEVEL] (rgerhards), 2009-08-20 - legacy syslog parser changed so that it now accepts date stamps in diff --git a/runtime/prop.c b/runtime/prop.c index 804f3491..d188b2ed 100644 --- a/runtime/prop.c +++ b/runtime/prop.c @@ -174,7 +174,7 @@ rsRetVal CreateOrReuseStringProp(prop_t **ppThis, uchar *psz, int len) } else { /* already exists, check if we can re-use it */ GetString(*ppThis, &pszPrev, &lenPrev); - if(len != lenPrev && ustrcmp(psz, pszPrev)) { + if(len != lenPrev || ustrcmp(psz, pszPrev)) { /* different, need to discard old & create new one */ propDestruct(ppThis); CHKiRet(CreateStringProp(ppThis, psz, len)); -- cgit v1.2.3 From d8ab04b533a6d2fc224e1931463b91508cc6d701 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 21 Aug 2009 16:48:00 +0200 Subject: bugfix: strings improperly reused [backported from v5] ... resulting in some message properties be populated with strings from previous messages. This was caused by an improper predicate check. --- ChangeLog | 5 +++++ runtime/prop.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 55ca5b45..cc9f9ea3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ --------------------------------------------------------------------------- +Version 4.5.3 [v4-beta] (rgerhards), 2009-08-?? +- bugfix: strings improperly reused, resulting in some message properties + be populated with strings from previous messages. This was caused by + an improper predicate check. [backported from v5] +--------------------------------------------------------------------------- Version 4.5.2 [v4-beta] (rgerhards), 2009-08-21 - legacy syslog parser changed so that it now accepts date stamps in wrong case. Some devices seem to create them and I do not see any harm diff --git a/runtime/prop.c b/runtime/prop.c index 804f3491..d188b2ed 100644 --- a/runtime/prop.c +++ b/runtime/prop.c @@ -174,7 +174,7 @@ rsRetVal CreateOrReuseStringProp(prop_t **ppThis, uchar *psz, int len) } else { /* already exists, check if we can re-use it */ GetString(*ppThis, &pszPrev, &lenPrev); - if(len != lenPrev && ustrcmp(psz, pszPrev)) { + if(len != lenPrev || ustrcmp(psz, pszPrev)) { /* different, need to discard old & create new one */ propDestruct(ppThis); CHKiRet(CreateStringProp(ppThis, psz, len)); -- cgit v1.2.3 From b5b26c2960fb8de308a5f7aef1b13f44b0d76b2c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 21 Aug 2009 18:07:22 +0200 Subject: minor update to rsyslog/syslog-ng comparison --- doc/rsyslog_ng_comparison.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/rsyslog_ng_comparison.html b/doc/rsyslog_ng_comparison.html index 8e121a8d..7d12a4a7 100644 --- a/doc/rsyslog_ng_comparison.html +++ b/doc/rsyslog_ng_comparison.html @@ -5,6 +5,10 @@

rsyslog vs. syslog-ng

Written by Rainer Gerhards (2008-05-06)

+

Warning: this comparison is a little outdated, take it with a grain +of salt and be sure to check the links at the bottom (both syslog-ng as well as +rsyslog features are missing, but our priority is on creating great software not +continously updating this comparison ;)).

We have often been asked about a comparison sheet between rsyslog and syslog-ng. Unfortunately, I do not know much about syslog-ng, I did not even use it once. Also, there seems to be no @@ -81,9 +85,10 @@ optional input Windows Event Log -via EventReporter +via a Windows event logging software such as +EventReporter or MonitorWare Agent -(both commercial software) +(both commercial software, both fund rsyslog development) via separate Windows agent, paid edition only -- cgit v1.2.3 From 03918b4478f5523873af32e3f9a62222f5ab7f20 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 24 Aug 2009 12:21:28 +0200 Subject: bugfix: Java testing tools were required, even if testbench was disabled This resulted in build errors if no Java was present on the build system, even though none of the selected option actually required Java. (I forgot to backport a similar fix to newer releases). --- ChangeLog | 6 ++++++ tests/Makefile.am | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 10bec0ec..0fa62688 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ --------------------------------------------------------------------------- +Version 4.4.1 [v4-stable] (rgerhards), 2009-08-?? +- bugfix: Java testing tools were required, even if testbench was disabled + This resulted in build errors if no Java was present on the build system, + even though none of the selected option actually required Java. + (I forgot to backport a similar fix to newer releases). +--------------------------------------------------------------------------- Version 4.4.0 [v4-stable] (rgerhards), 2009-08-21 - bugfix: stderr/stdout were not closed to be able to emit error messages, but this caused ssh sessions to hang. Now we close them after the diff --git a/tests/Makefile.am b/tests/Makefile.am index 88c3137e..3f5a6c33 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -12,14 +12,14 @@ if ENABLE_OMSTDOUT TESTS += omod-if-array.sh parsertest.sh inputname.sh fieldtest.sh endif +check_JAVA = DiagTalker.java + endif # if ENABLE_TESTBENCH TESTS_ENVIRONMENT = RSYSLOG_MODDIR='$(abs_top_builddir)'/runtime/.libs/ DISTCLEANFILES=rsyslog.pid '$(abs_top_builddir)'/DiagTalker.class test_files = testbench.h runtime-dummy.c -check_JAVA = DiagTalker.java - EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ validation-run.sh \ testsuites/invalid.conf \ -- cgit v1.2.3 From 8c125325cf239d7303e0f479b284fd1f59c223f7 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 25 Aug 2009 12:14:50 +0200 Subject: features requiring Java are automatically disabled if Java is not present (thanks to Michael Biebl for his help!) --- ChangeLog | 2 ++ Makefile.am | 1 - configure.ac | 11 +++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0fa62688..1abea003 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ --------------------------------------------------------------------------- Version 4.4.1 [v4-stable] (rgerhards), 2009-08-?? +- features requiring Java are automatically disabled if Java is not + present (thanks to Michael Biebl for his help!) - bugfix: Java testing tools were required, even if testbench was disabled This resulted in build errors if no Java was present on the build system, even though none of the selected option actually required Java. diff --git a/Makefile.am b/Makefile.am index 8a130655..a050e95e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,6 @@ sbin_PROGRAMS = pkglib_LTLIBRARIES = - if ENABLE_INET pkglib_LTLIBRARIES += lmtcpsrv.la lmtcpclt.la # diff --git a/configure.ac b/configure.ac index 6be11b0d..fec55863 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,12 @@ AC_CONFIG_HEADERS([config.h]) AC_GNU_SOURCE +# check for Java compiler +AC_CHECK_PROG(HAVE_JAVAC, [javac], [yes]) +if test x"$HAVE_JAVAC" = x"yes"; then + AC_MSG_WARN([no javac found, disabling features depending on it]) +fi + # Checks for programs. AC_PROG_CC AM_PROG_CC_C_O @@ -689,6 +695,11 @@ AC_ARG_ENABLE(testbench, esac], [enable_testbench=yes] ) +if test "$enable_testbench" = "yes"; then + if test x$HAVE_JAVAC = x; then + enable_testbench='no' + fi +fi AM_CONDITIONAL(ENABLE_TESTBENCH, test x$enable_testbench = xyes) -- cgit v1.2.3 From 1164429974dcd71ef59dededd3fec54162d919dd Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 25 Aug 2009 15:55:57 +0200 Subject: bugfix: invalid double-quoted PRI, among others in outgoing messages This causes grief with all receivers. Bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=147 --- ChangeLog | 3 +++ runtime/msg.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1abea003..74f40fa4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ Version 4.4.1 [v4-stable] (rgerhards), 2009-08-?? - features requiring Java are automatically disabled if Java is not present (thanks to Michael Biebl for his help!) +- bugfix: invalid double-quoted PRI, among others in outgoing messages + This causes grief with all receivers. + Bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=147 - bugfix: Java testing tools were required, even if testbench was disabled This resulted in build errors if no Java was present on the build system, even though none of the selected option actually required Java. diff --git a/runtime/msg.c b/runtime/msg.c index 22f81f5d..e26fe5ee 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -751,7 +751,7 @@ static inline char *getPRI(msg_t *pM) */ MsgLock(pM); if(pM->bufPRI[0] == '\0') { - snprintf((char*)pM->bufPRI, sizeof(pM->bufPRI), "<%d>", getPRIi(pM)); + snprintf((char*)pM->bufPRI, sizeof(pM->bufPRI), "%d", getPRIi(pM)); } MsgUnlock(pM); -- cgit v1.2.3 From c024a3784fbab28d724e038b784d3b72125848c4 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 26 Aug 2009 12:22:31 +0200 Subject: very minor fix: removing invalid doc left-over from merge --- ChangeLog | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index cc9f9ea3..98eefe27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -156,15 +156,6 @@ Version 4.3.0 [DEVEL] (rgerhards), 2009-04-17 connection broke, but not if there was a problem with statement execution. The most probable case for such a case would be invalid sql inside the template, and this is now much easier to diagnose. -<<<<<<< HEAD:ChangeLog ---------------------------------------------------------------------------- -Version 4.2.1 [v4-stable] (rgerhards), 2009-0?-?? -- bugfix: stderr/stdout were not closed to be able to emit error messages, - but this caused ssh sessions to hang. Now we close them after the - initial initialization. See forum thread: - http://kb.monitorware.com/controlling-terminal-issues-t9875.html -======= ->>>>>>> bd7542b51593739893922e8ec8fb6d7195d06cbe:ChangeLog --------------------------------------------------------------------------- Version 4.2.0 [v4-stable] (rgerhards), 2009-06-23 - bugfix: light and full delay watermarks had invalid values, badly -- cgit v1.2.3 From aba8792c8a82ef52a3188ee7295e501ca21dae3b Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 26 Aug 2009 12:57:06 +0200 Subject: bugfix: message sanitation had some issues - control character DEL was not properly escaped - NUL and LF characters were not properly stripped if no control character replacement was to be done - NUL characters in the message body were silently dropped (this was a regeression introduced by some of the recent optimizations) --- ChangeLog | 6 ++++++ runtime/msg.h | 17 +++++++++++++++++ runtime/parser.c | 16 ++++++++++++---- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98eefe27..4d3d9493 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ --------------------------------------------------------------------------- Version 4.5.3 [v4-beta] (rgerhards), 2009-08-?? +- bugfix: message sanitation had some issues: + - control character DEL was not properly escaped + - NUL and LF characters were not properly stripped if no control + character replacement was to be done + - NUL characters in the message body were silently dropped (this was + a regeression introduced by some of the recent optimizations) - bugfix: strings improperly reused, resulting in some message properties be populated with strings from previous messages. This was caused by an improper predicate check. [backported from v5] diff --git a/runtime/msg.h b/runtime/msg.h index 0b346f7b..3a02365b 100644 --- a/runtime/msg.h +++ b/runtime/msg.h @@ -192,6 +192,23 @@ uchar *propIDToName(propid_t propID); extern void (*funcMsgPrepareEnqueue)(msg_t *pMsg); #define MsgPrepareEnqueue(pMsg) funcMsgPrepareEnqueue(pMsg) + +/* ------------------------------ some inline functions ------------------------------ */ + +/* set raw message size. This is needed in some cases where a trunctation is necessary + * but the raw message must not be newly set. The most important (and currently only) + * use case is if we remove trailing LF or NUL characters. Note that the size can NOT + * be extended, only shrunk! + * rgerhards, 2009-08-26 + */ +static inline void +MsgSetRawMsgSize(msg_t *pMsg, size_t newLen) +{ + assert(newLen <= (size_t) pMsg->iLenRawMsg); + pMsg->iLenRawMsg = newLen; +} + + #endif /* #ifndef MSG_H_INCLUDED */ /* vim:set ai: */ diff --git a/runtime/parser.c b/runtime/parser.c index a2538fa3..db11ac5b 100644 --- a/runtime/parser.c +++ b/runtime/parser.c @@ -163,6 +163,7 @@ sanitizeMessage(msg_t *pMsg) size_t iDst; size_t iMaxLine; size_t maxDest; + bool bUpdatedLen = FALSE; uchar szSanBuf[32*1024]; /* buffer used for sanitizing a string */ assert(pMsg != NULL); @@ -177,6 +178,7 @@ sanitizeMessage(msg_t *pMsg) /* remove NUL character at end of message (see comment in function header) */ if(pszMsg[lenMsg-1] == '\0') { DBGPRINTF("dropped NUL at very end of message\n"); + bUpdatedLen = TRUE; lenMsg--; } @@ -187,6 +189,7 @@ sanitizeMessage(msg_t *pMsg) */ if(bDropTrailingLF && pszMsg[lenMsg-1] == '\n') { DBGPRINTF("dropped LF at very end of message (DropTrailingLF is set)\n"); + bUpdatedLen = TRUE; lenMsg--; } @@ -197,7 +200,7 @@ sanitizeMessage(msg_t *pMsg) */ int bNeedSanitize = 0; for(iSrc = 0 ; iSrc < lenMsg ; iSrc++) { - if(pszMsg[iSrc] < 32) { + if(iscntrl(pszMsg[iSrc])) { if(pszMsg[iSrc] == '\0' || bEscapeCCOnRcv) { bNeedSanitize = 1; break; @@ -205,8 +208,11 @@ sanitizeMessage(msg_t *pMsg) } } - if(!bNeedSanitize) + if(!bNeedSanitize) { + if(bUpdatedLen == TRUE) + MsgSetRawMsgSize(pMsg, lenMsg); FINALIZE; + } /* now copy over the message and sanitize it */ iMaxLine = glbl.GetMaxLine(); @@ -219,8 +225,10 @@ sanitizeMessage(msg_t *pMsg) CHKmalloc(pDst = malloc(sizeof(uchar) * (iMaxLine + 1))); iSrc = iDst = 0; while(iSrc < lenMsg && iDst < maxDest - 3) { /* leave some space if last char must be escaped */ - if(pszMsg[iSrc] == '\0') { /* guard against \0 characters... */ - } else if(iscntrl((int) pszMsg[iSrc])) { + if(iscntrl((int) pszMsg[iSrc])) { + /* note: \0 must always be escaped, the rest of the code currently + * can not handle it! -- rgerhards, 2009-08-26 + */ if(pszMsg[iSrc] == '\0' || bEscapeCCOnRcv) { /* we are configured to escape control characters. Please note * that this most probably break non-western character sets like -- cgit v1.2.3 From d1b092da1eeec18ad4aafdad24f9249871d345a5 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 26 Aug 2009 15:44:36 +0200 Subject: reduced number of debug messages a bit again --- action.c | 9 --------- runtime/queue.c | 2 -- runtime/rule.c | 2 -- runtime/ruleset.c | 2 -- 4 files changed, 15 deletions(-) diff --git a/action.c b/action.c index 1e02d23e..d8ccafb6 100644 --- a/action.c +++ b/action.c @@ -809,7 +809,6 @@ tryDoAction(action_t *pAction, batch_t *pBatch, int *pnElem) assert(pBatch != NULL); assert(pnElem != NULL); -dbgprintf("XXXX: ENTER tryDoAction elt 0 state %d\n", pBatch->pElem[0].state); i = pBatch->iDoneUpTo; /* all messages below that index are processed */ iElemProcessed = 0; @@ -835,7 +834,6 @@ dbgprintf("XXXX: ENTER tryDoAction elt 0 state %d\n", pBatch->pElem[0].state); pBatch->pElem[i].state = BATCH_STATE_SUB; } else if(localRet == RS_RET_DISCARDMSG) { pBatch->pElem[i].state = BATCH_STATE_DISC; -dbgprintf("XXXX: discardmsg! change state to _DISC: %d\n", pBatch->pElem[i].state); } else { iRet = localRet; FINALIZE; @@ -852,7 +850,6 @@ finalize_it: *pnElem += iCommittedUpTo - pBatch->iDoneUpTo; pBatch->iDoneUpTo = iCommittedUpTo; } -dbgprintf("XXXX: done tryDoAction elt 0 state %d, iret %d\n", pBatch->pElem[0].state, iRet); RETiRet; } @@ -875,7 +872,6 @@ submitBatch(action_t *pAction, batch_t *pBatch, int nElem) bDone = 0; do { localRet = tryDoAction(pAction, pBatch, &nElem); -dbgprintf("XXXX: submitBatch got state %d\n", localRet); if( localRet == RS_RET_OK || localRet == RS_RET_PREVIOUS_COMMITTED || localRet == RS_RET_DEFER_COMMIT) { @@ -885,7 +881,6 @@ dbgprintf("XXXX: submitBatch got state %d\n", localRet); localRet = finishBatch(pAction); } -dbgprintf("XXXX: submitBatch got state %d\n", localRet); if( localRet == RS_RET_OK || localRet == RS_RET_PREVIOUS_COMMITTED || localRet == RS_RET_DEFER_COMMIT) { @@ -893,7 +888,6 @@ dbgprintf("XXXX: submitBatch got state %d\n", localRet); } else if(localRet == RS_RET_DISCARDMSG) { iRet = RS_RET_DISCARDMSG; /* TODO: verify this sequence -- rgerhards, 2009-07-30 */ bDone = 1; -dbgprintf("XXXX: submitBatch DONE state %d\n", localRet); } else if(localRet == RS_RET_SUSPENDED) { ; /* do nothing, this will retry the full batch */ } else if(localRet == RS_RET_ACTION_FAILED) { @@ -913,10 +907,8 @@ dbgprintf("XXXX: submitBatch DONE state %d\n", localRet); bDone = 1; } } -dbgprintf("XXXX: submitBatch pre while state %d\n", localRet); } while(!bDone); /* do .. while()! */ -dbgprintf("XXXX: END submitBatch elt 0 state %d, iRet %d\n", pBatch->pElem[0].state, iRet); RETiRet; } @@ -1152,7 +1144,6 @@ actionWriteToAction(action_t *pAction) * So let's enqueue our message for execution. -- rgerhards, 2007-07-24 */ iRet = qqueueEnqObj(pAction->pQueue, pAction->f_pMsg->flowCtlType, (void*) MsgAddRef(pAction->f_pMsg)); -dbgprintf("XXXX: queueEnqObj returned %d\n", iRet); if(iRet == RS_RET_OK) pAction->f_prevcount = 0; /* message processed, so we start a new cycle */ diff --git a/runtime/queue.c b/runtime/queue.c index 8388d00e..cb14b58d 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -1044,7 +1044,6 @@ static rsRetVal qAddDirect(qqueue_t *pThis, void* pUsr) iRet = pThis->pConsumer(pThis->pUsr, &singleBatch); objDestruct(pUsr); -dbgprintf("XXXX: qAddDirect returns %d\n", iRet); RETiRet; } @@ -2443,7 +2442,6 @@ doEnqSingleObj(qqueue_t *pThis, flowControl_t flowCtlType, void *pUsr) CHKiRet(qqueueAdd(pThis, pUsr)); finalize_it: -dbgprintf("XXXX: queueEnqObj returns %d\n", iRet); RETiRet; } diff --git a/runtime/rule.c b/runtime/rule.c index bcd82e5f..182d616a 100644 --- a/runtime/rule.c +++ b/runtime/rule.c @@ -83,7 +83,6 @@ DEFFUNC_llExecFunc(processMsgDoActions) } iRetMod = actionCallAction(pAction, pDoActData->pMsg); -dbgprintf("XXXX: processMsgDoActions returns %d\n", iRet); if(iRetMod == RS_RET_DISCARDMSG) { ABORT_FINALIZE(RS_RET_DISCARDMSG); } else if(iRetMod == RS_RET_SUSPENDED) { @@ -272,7 +271,6 @@ processMsg(rule_t *pThis, msg_t *pMsg) } finalize_it: -dbgprintf("XXXX: rule.processMsg returns %d\n", iRet); RETiRet; } diff --git a/runtime/ruleset.c b/runtime/ruleset.c index c1b6d490..5ac9a8fd 100644 --- a/runtime/ruleset.c +++ b/runtime/ruleset.c @@ -141,7 +141,6 @@ DEFFUNC_llExecFunc(processMsgDoRules) rsRetVal iRet; ISOBJ_TYPE_assert(pData, rule); iRet = rule.ProcessMsg((rule_t*) pData, (msg_t*) pParam); -dbgprintf("XXXX: pcoessMsgDoRules returns %d\n", iRet); return iRet; } @@ -162,7 +161,6 @@ processMsg(msg_t *pMsg) CHKiRet(llExecFunc(&pThis->llRules, processMsgDoRules, pMsg)); finalize_it: -dbgprintf("XXXX: processMsg got return state %d\n", iRet); //if(iRet == RS_RET_DISCARDMSG) //iRet = RS_RET_OK; -- cgit v1.2.3 From 7aa30acc744ae53aab2a0b2e3d1a1b0081d9e393 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 27 Aug 2009 12:10:44 +0200 Subject: bugfix (backport): omfwd segfault Note that the orginal (higher version) patch states this happens only when debugging mode is turned on. That statement is wrong: if debug mode is turned off, the message is not being emitted, but the division by zero in the actual parameters still happens. --- ChangeLog | 5 +++++ tools/omfwd.c | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74f40fa4..13de9eac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,11 @@ Version 4.4.1 [v4-stable] (rgerhards), 2009-08-?? This resulted in build errors if no Java was present on the build system, even though none of the selected option actually required Java. (I forgot to backport a similar fix to newer releases). +- bugfix (backport): omfwd segfault + Note that the orginal (higher version) patch states this happens only + when debugging mode is turned on. That statement is wrong: if debug + mode is turned off, the message is not being emitted, but the division + by zero in the actual parameters still happens. --------------------------------------------------------------------------- Version 4.4.0 [v4-stable] (rgerhards), 2009-08-21 - bugfix: stderr/stdout were not closed to be able to emit error messages, diff --git a/tools/omfwd.c b/tools/omfwd.c index 4d730f4b..97703c79 100644 --- a/tools/omfwd.c +++ b/tools/omfwd.c @@ -205,8 +205,6 @@ static rsRetVal UDPSend(instanceData *pData, char *msg, size_t len) unsigned lsent = 0; int bSendSuccess; -dbgprintf("rebind logic: interval %d, curr %d, mod %d, if %d\n", pData->iUDPRebindInterval, pData->nXmit, - (pData->nXmit % pData->iUDPRebindInterval), ((pData->nXmit % pData->iUDPRebindInterval) == 0)); if(pData->iUDPRebindInterval && (pData->nXmit++ % pData->iUDPRebindInterval == 0)) { dbgprintf("omfwd dropping UDP 'connection' (as configured)\n"); pData->nXmit = 1; /* else we have an addtl wrap at 2^31-1 */ -- cgit v1.2.3