From 793155415708271d94f1238d5294c08ad3831d3a Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 31 Jan 2012 17:14:23 +0100 Subject: stats: generate friendly name for action queues, if possible --- action.c | 9 +++++++-- configure.ac | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/action.c b/action.c index f16146c1..e465b826 100644 --- a/action.c +++ b/action.c @@ -348,8 +348,13 @@ actionConstructFinalize(action_t *pThis) CHKiRet(statsobj.ConstructFinalize(pThis->statsobj)); /* create our queue */ - /* find a name for our queue */ - snprintf((char*) pszAName, sizeof(pszAName)/sizeof(uchar), "action %d queue", iActionNbr); + /* find a (friendly) name for our queue */ + if(pThis->pszName == NULL) { + snprintf((char*) pszAName, sizeof(pszAName)/sizeof(uchar), "action %d queue", iActionNbr); + } else { + snprintf((char*) pszAName, sizeof(pszAName)/sizeof(uchar), "%s queue", pThis->pszName); + } + pszAName[63] = '\0'; /* to be on the save side */ /* now check if we can run the action in "firehose mode" during stage one of * its processing (that is before messages are enqueued into the action q). diff --git a/configure.ac b/configure.ac index c6d775af..5bfaf42c 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([rsyslog],[5.8.6-newstats6],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[5.8.7-newstats7],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -- cgit From 19a80194032b4bbdf6ad98bd00a89528137b4883 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 31 Jan 2012 17:35:41 +0100 Subject: stats: added unique (and friendly) name for ruleset queues --- runtime/ruleset.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/ruleset.c b/runtime/ruleset.c index 5ee2a55a..69968a52 100644 --- a/runtime/ruleset.c +++ b/runtime/ruleset.c @@ -500,6 +500,7 @@ debugPrintAll(void) static rsRetVal rulesetCreateQueue(void __attribute__((unused)) *pVal, int *pNewVal) { + uchar *rulesetMainQName; DEFiRet; if(pCurrRuleset == NULL) { @@ -518,7 +519,9 @@ rulesetCreateQueue(void __attribute__((unused)) *pVal, int *pNewVal) FINALIZE; /* if it is turned off, we do not need to change anything ;) */ dbgprintf("adding a ruleset-specific \"main\" queue"); - CHKiRet(createMainQueue(&pCurrRuleset->pQueue, UCHAR_CONSTANT("ruleset"))); + rulesetMainQName = (pCurrRuleset->pszName == NULL)? UCHAR_CONSTANT("ruleset") : + pCurrRuleset->pszName; + CHKiRet(createMainQueue(&pCurrRuleset->pQueue, rulesetMainQName)); finalize_it: RETiRet; -- cgit From 6cfa853457b190193ba68f77d27e000f2567481e Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 20 Feb 2012 12:48:17 +0100 Subject: bugfix: imptcp stats sometimes incorrectly reported socket as IPv6 --- configure.ac | 2 +- plugins/imptcp/imptcp.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 5bfaf42c..67c38ade 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([rsyslog],[5.8.7-newstats7],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[5.8.7-newstats8],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c index 103da210..e191c64f 100644 --- a/plugins/imptcp/imptcp.c +++ b/plugins/imptcp/imptcp.c @@ -281,7 +281,9 @@ startupSrv(ptcpsrv_t *pSrv) continue; } #endif - } + } else { + isIPv6 = 0; + } if(setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &on, sizeof(on)) < 0 ) { DBGPRINTF("error %d setting tcp socket option\n", errno); close(sock); -- cgit From f9b6b94b802c653e6c588f42af0997682e75f267 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 21 Feb 2012 16:52:36 +0100 Subject: added configuration directives to customize queue light delay marks $MainMsgQueueLightDelayMark, $ActionQueueLightDelayMark; both specify number of messages starting at which a delay happens. --- ChangeLog | 3 +++ action.c | 4 ++++ configure.ac | 2 +- runtime/queue.c | 1 + runtime/queue.h | 1 + tools/syslogd.c | 8 ++++++-- 6 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c02d397b..7afe453d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +- added configuration directives to customize queue light delay marks + $MainMsgQueueLightDelayMark, $ActionQueueLightDelayMark; both + specify number of messages starting at which a delay happens. --------------------------------------------------------------------------- Version 5.8.8 [V5-stable] 2012-0?-?? - bugfix: omprog made rsyslog abort on startup if not binary to diff --git a/action.c b/action.c index e465b826..f85b1c46 100644 --- a/action.c +++ b/action.c @@ -144,6 +144,7 @@ static queueType_t ActionQueType = QUEUETYPE_DIRECT; /* type of the main messag static int iActionQueueSize = 1000; /* size of the main message queue above */ static int iActionQueueDeqBatchSize = 16; /* batch size for action queues */ static int iActionQHighWtrMark = 800; /* high water mark for disk-assisted queues */ +static int iActionQLightDlyMrk = 700; /* light delay mark for disk-assisted queues */ static int iActionQLowWtrMark = 200; /* low water mark for disk-assisted queues */ static int iActionQDiscardMark = 9800; /* begin to discard messages */ static int iActionQDiscardSeverity = 8; /* by default, discard nothing to prevent unintentional loss */ @@ -226,6 +227,7 @@ actionResetQueueParams(void) iActionQueueSize = 1000; /* size of the main message queue above */ iActionQueueDeqBatchSize = 16; /* default batch size */ iActionQHighWtrMark = 800; /* high water mark for disk-assisted queues */ + iActionQLightDlyMrk = 700; iActionQLowWtrMark = 200; /* low water mark for disk-assisted queues */ iActionQDiscardMark = 9800; /* begin to discard messages */ iActionQDiscardSeverity = 8; /* discard warning and above */ @@ -422,6 +424,7 @@ actionConstructFinalize(action_t *pThis) setQPROP(qqueueSettoWrkShutdown, "$ActionQueueWorkerTimeoutThreadShutdown", iActionQtoWrkShutdown); setQPROP(qqueueSettoEnq, "$ActionQueueTimeoutEnqueue", iActionQtoEnq); setQPROP(qqueueSetiHighWtrMrk, "$ActionQueueHighWaterMark", iActionQHighWtrMark); + setQPROP(qqueueSetiLightDlyMrk, "$ActionQueueLightDelayMark", iActionQLightDlyMrk); setQPROP(qqueueSetiLowWtrMrk, "$ActionQueueLowWaterMark", iActionQLowWtrMark); setQPROP(qqueueSetiDiscardMrk, "$ActionQueueDiscardMark", iActionQDiscardMark); setQPROP(qqueueSetiDiscardSeverity, "$ActionQueueDiscardSeverity", iActionQDiscardSeverity); @@ -1883,6 +1886,7 @@ rsRetVal actionClassInit(void) CHKiRet(regCfSysLineHdlr((uchar *)"actionqueuehighwatermark", 0, eCmdHdlrInt, NULL, &iActionQHighWtrMark, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"actionqueuelowwatermark", 0, eCmdHdlrInt, NULL, &iActionQLowWtrMark, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"actionqueuediscardmark", 0, eCmdHdlrInt, NULL, &iActionQDiscardMark, NULL)); + CHKiRet(regCfSysLineHdlr((uchar *)"actionqueuelightdelaymark", 0, eCmdHdlrInt, NULL, &iActionQLightDlyMrk, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"actionqueuediscardseverity", 0, eCmdHdlrInt, NULL, &iActionQDiscardSeverity, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"actionqueuecheckpointinterval", 0, eCmdHdlrInt, NULL, &iActionQPersistUpdCnt, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"actionqueuesyncqueuefiles", 0, eCmdHdlrBinary, NULL, &bActionQSyncQeueFiles, NULL)); diff --git a/configure.ac b/configure.ac index 67c38ade..393b778b 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([rsyslog],[5.8.7-newstats8],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[5.8.7-newstats9],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) diff --git a/runtime/queue.c b/runtime/queue.c index e97d78e8..523ae0fc 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -2438,6 +2438,7 @@ DEFpropSetMeth(qqueue, iLowWtrMrk, int) DEFpropSetMeth(qqueue, iDiscardMrk, int) DEFpropSetMeth(qqueue, iFullDlyMrk, int) DEFpropSetMeth(qqueue, iDiscardSeverity, int) +DEFpropSetMeth(qqueue, iLightDlyMrk, int) DEFpropSetMeth(qqueue, bIsDA, int) DEFpropSetMeth(qqueue, iMinMsgsPerWrkr, int) DEFpropSetMeth(qqueue, bSaveOnShutdown, int) diff --git a/runtime/queue.h b/runtime/queue.h index 06a58229..dbd6f249 100644 --- a/runtime/queue.h +++ b/runtime/queue.h @@ -201,6 +201,7 @@ PROTOTYPEpropSetMeth(qqueue, toQShutdown, long); PROTOTYPEpropSetMeth(qqueue, toActShutdown, long); PROTOTYPEpropSetMeth(qqueue, toWrkShutdown, long); PROTOTYPEpropSetMeth(qqueue, toEnq, long); +PROTOTYPEpropSetMeth(qqueue, iLightDlyMrk, int); PROTOTYPEpropSetMeth(qqueue, iHighWtrMrk, int); PROTOTYPEpropSetMeth(qqueue, iLowWtrMrk, int); PROTOTYPEpropSetMeth(qqueue, iDiscardMrk, int); diff --git a/tools/syslogd.c b/tools/syslogd.c index 0b7bbc96..4c537570 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -262,6 +262,7 @@ static uchar *pszConfDAGFile = NULL; /* name of config DAG file, non-NULL mea qqueue_t *pMsgQueue = NULL; /* the main message queue */ static int iMainMsgQueueSize = 10000; /* size of the main message queue above */ static int iMainMsgQHighWtrMark = 8000; /* high water mark for disk-assisted queues */ +static int iMainMsgQLightDlyMark = 7000; /* light delay mark for disk-assisted queues */ static int iMainMsgQLowWtrMark = 2000; /* low water mark for disk-assisted queues */ static int iMainMsgQDiscardMark = 9800; /* begin to discard messages */ static int iMainMsgQDiscardSeverity = 8; /* by default, discard nothing to prevent unintentional loss */ @@ -300,6 +301,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a pszMainMsgQFName = NULL; iMainMsgQueueSize = 10000; iMainMsgQHighWtrMark = 8000; + iMainMsgQLightDlyMark = 7000; iMainMsgQLowWtrMark = 2000; iMainMsgQDiscardMark = 9800; iMainMsgQDiscardSeverity = 8; @@ -1457,8 +1459,8 @@ static void dbgPrintInitInfo(void) iMainMsgQueueNumWorkers, iMainMsgQtoWrkShutdown, iMainMsgQPersistUpdCnt); DBGPRINTF("Main queue timeouts: shutdown: %d, action completion shutdown: %d, enq: %d\n", iMainMsgQtoQShutdown, iMainMsgQtoActShutdown, iMainMsgQtoEnq); - DBGPRINTF("Main queue watermarks: high: %d, low: %d, discard: %d, discard-severity: %d\n", - iMainMsgQHighWtrMark, iMainMsgQLowWtrMark, iMainMsgQDiscardMark, iMainMsgQDiscardSeverity); + DBGPRINTF("Main queue watermarks: high: %d, low: %d, discard: %d, discard-severity: %d, light-delay %d\n", + iMainMsgQHighWtrMark, iMainMsgQLowWtrMark, iMainMsgQDiscardMark, iMainMsgQDiscardSeverity, iMainMsgQLightDlyMark); DBGPRINTF("Main queue save on shutdown %d, max disk space allowed %lld\n", bMainMsgQSaveOnShutdown, iMainMsgQueMaxDiskSpace); /* TODO: add @@ -1574,6 +1576,7 @@ rsRetVal createMainQueue(qqueue_t **ppQueue, uchar *pszQueueName) setQPROP(qqueueSetiHighWtrMrk, "$MainMsgQueueHighWaterMark", iMainMsgQHighWtrMark); setQPROP(qqueueSetiLowWtrMrk, "$MainMsgQueueLowWaterMark", iMainMsgQLowWtrMark); setQPROP(qqueueSetiDiscardMrk, "$MainMsgQueueDiscardMark", iMainMsgQDiscardMark); + setQPROP(qqueueSetiLightDlyMrk, "$MainMsgQueueLightDelayMark", iMainMsgQLightDlyMark); setQPROP(qqueueSetiDiscardSeverity, "$MainMsgQueueDiscardSeverity", iMainMsgQDiscardSeverity); setQPROP(qqueueSetiMinMsgsPerWrkr, "$MainMsgQueueWorkerThreadMinimumMessages", iMainMsgQWrkMinMsgs); setQPROP(qqueueSetbSaveOnShutdown, "$MainMsgQueueSaveOnShutdown", bMainMsgQSaveOnShutdown); @@ -2051,6 +2054,7 @@ static rsRetVal loadBuildInModules(void) CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuehighwatermark", 0, eCmdHdlrInt, NULL, &iMainMsgQHighWtrMark, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuelowwatermark", 0, eCmdHdlrInt, NULL, &iMainMsgQLowWtrMark, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuediscardmark", 0, eCmdHdlrInt, NULL, &iMainMsgQDiscardMark, NULL)); + CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuelightdelaymark", 0, eCmdHdlrInt, NULL, &iMainMsgQLightDlyMark, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuediscardseverity", 0, eCmdHdlrSeverity, NULL, &iMainMsgQDiscardSeverity, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuecheckpointinterval", 0, eCmdHdlrInt, NULL, &iMainMsgQPersistUpdCnt, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuesyncqueuefiles", 0, eCmdHdlrBinary, NULL, &bMainMsgQSyncQeueFiles, NULL)); -- cgit From 5c09faee34befd6c2fa117055928c810ccf86f91 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 22 Feb 2012 09:43:25 +0100 Subject: queue: lightdelay config: keep default of 70% until mark is explicitely set --- action.c | 8 +++++--- tools/syslogd.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/action.c b/action.c index f85b1c46..7de10d49 100644 --- a/action.c +++ b/action.c @@ -144,7 +144,7 @@ static queueType_t ActionQueType = QUEUETYPE_DIRECT; /* type of the main messag static int iActionQueueSize = 1000; /* size of the main message queue above */ static int iActionQueueDeqBatchSize = 16; /* batch size for action queues */ static int iActionQHighWtrMark = 800; /* high water mark for disk-assisted queues */ -static int iActionQLightDlyMrk = 700; /* light delay mark for disk-assisted queues */ +static int iActionQLightDlyMrk = -1; /* light delay mark for disk-assisted queues */ static int iActionQLowWtrMark = 200; /* low water mark for disk-assisted queues */ static int iActionQDiscardMark = 9800; /* begin to discard messages */ static int iActionQDiscardSeverity = 8; /* by default, discard nothing to prevent unintentional loss */ @@ -227,7 +227,7 @@ actionResetQueueParams(void) iActionQueueSize = 1000; /* size of the main message queue above */ iActionQueueDeqBatchSize = 16; /* default batch size */ iActionQHighWtrMark = 800; /* high water mark for disk-assisted queues */ - iActionQLightDlyMrk = 700; + iActionQLightDlyMrk = -1; iActionQLowWtrMark = 200; /* low water mark for disk-assisted queues */ iActionQDiscardMark = 9800; /* begin to discard messages */ iActionQDiscardSeverity = 8; /* discard warning and above */ @@ -424,7 +424,9 @@ actionConstructFinalize(action_t *pThis) setQPROP(qqueueSettoWrkShutdown, "$ActionQueueWorkerTimeoutThreadShutdown", iActionQtoWrkShutdown); setQPROP(qqueueSettoEnq, "$ActionQueueTimeoutEnqueue", iActionQtoEnq); setQPROP(qqueueSetiHighWtrMrk, "$ActionQueueHighWaterMark", iActionQHighWtrMark); - setQPROP(qqueueSetiLightDlyMrk, "$ActionQueueLightDelayMark", iActionQLightDlyMrk); + if(iActionQLightDlyMrk > 0) { + setQPROP(qqueueSetiLightDlyMrk, "$ActionQueueLightDelayMark", iActionQLightDlyMrk); + } setQPROP(qqueueSetiLowWtrMrk, "$ActionQueueLowWaterMark", iActionQLowWtrMark); setQPROP(qqueueSetiDiscardMrk, "$ActionQueueDiscardMark", iActionQDiscardMark); setQPROP(qqueueSetiDiscardSeverity, "$ActionQueueDiscardSeverity", iActionQDiscardSeverity); diff --git a/tools/syslogd.c b/tools/syslogd.c index 4c537570..c0e663d2 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -262,7 +262,7 @@ static uchar *pszConfDAGFile = NULL; /* name of config DAG file, non-NULL mea qqueue_t *pMsgQueue = NULL; /* the main message queue */ static int iMainMsgQueueSize = 10000; /* size of the main message queue above */ static int iMainMsgQHighWtrMark = 8000; /* high water mark for disk-assisted queues */ -static int iMainMsgQLightDlyMark = 7000; /* light delay mark for disk-assisted queues */ +static int iMainMsgQLightDlyMark = -1; /* light delay mark for disk-assisted queues */ static int iMainMsgQLowWtrMark = 2000; /* low water mark for disk-assisted queues */ static int iMainMsgQDiscardMark = 9800; /* begin to discard messages */ static int iMainMsgQDiscardSeverity = 8; /* by default, discard nothing to prevent unintentional loss */ @@ -301,7 +301,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a pszMainMsgQFName = NULL; iMainMsgQueueSize = 10000; iMainMsgQHighWtrMark = 8000; - iMainMsgQLightDlyMark = 7000; + iMainMsgQLightDlyMark = -1; iMainMsgQLowWtrMark = 2000; iMainMsgQDiscardMark = 9800; iMainMsgQDiscardSeverity = 8; @@ -1576,7 +1576,9 @@ rsRetVal createMainQueue(qqueue_t **ppQueue, uchar *pszQueueName) setQPROP(qqueueSetiHighWtrMrk, "$MainMsgQueueHighWaterMark", iMainMsgQHighWtrMark); setQPROP(qqueueSetiLowWtrMrk, "$MainMsgQueueLowWaterMark", iMainMsgQLowWtrMark); setQPROP(qqueueSetiDiscardMrk, "$MainMsgQueueDiscardMark", iMainMsgQDiscardMark); - setQPROP(qqueueSetiLightDlyMrk, "$MainMsgQueueLightDelayMark", iMainMsgQLightDlyMark); + if(iMainMsgQLightDlyMark > 0) { + setQPROP(qqueueSetiLightDlyMrk, "$MainMsgQueueLightDelayMark", iMainMsgQLightDlyMark); + } setQPROP(qqueueSetiDiscardSeverity, "$MainMsgQueueDiscardSeverity", iMainMsgQDiscardSeverity); setQPROP(qqueueSetiMinMsgsPerWrkr, "$MainMsgQueueWorkerThreadMinimumMessages", iMainMsgQWrkMinMsgs); setQPROP(qqueueSetbSaveOnShutdown, "$MainMsgQueueSaveOnShutdown", bMainMsgQSaveOnShutdown); -- cgit From 9601b181cf5d2166e2c813973e82a4b48002e83f Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 6 Mar 2012 17:26:04 +0100 Subject: added capability to use a local interface IP address as fromhost-ip for imuxsock new config directives: $IMUXSockLocalIPIF --- ChangeLog | 3 +++ doc/imuxsock.html | 7 +++++- plugins/imuxsock/imuxsock.c | 35 ++++++++++++++++++++++++----- runtime/net.c | 54 ++++++++++++++++++++++++++++++++++++++++++++- runtime/net.h | 6 +++-- tools/syslogd.c | 1 + 6 files changed, 97 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 99e324ab..78f74695 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +- added capability to use a local interface IP address as fromhost-ip for + imuxsock + new config directives: $IMUXSockLocalIPIF - added configuration directives to customize queue light delay marks $MainMsgQueueLightDelayMark, $ActionQueueLightDelayMark; both specify number of messages starting at which a delay happens. diff --git a/doc/imuxsock.html b/doc/imuxsock.html index ee5db22d..1b79dd0d 100644 --- a/doc/imuxsock.html +++ b/doc/imuxsock.html @@ -64,6 +64,11 @@ burst in number of messages. Default is 200.
  • $IMUXSockRateLimitSeverity [numerical severity] - specifies the severity of messages that shall be rate-limited.
  • +
  • $IMUXSockLocalIPIF [interface name] - if provided, the IP of the specified +interface (e.g. "eth0") shall be used as fromhost-ip for imuxsock-originating messages. +If this directive is not given OR the interface cannot be found (or has no IP address), +the default of "127.0.0.1" is used. +
  • $InputUnixListenSocketUsePIDFromSystem [on/off] - specifies if the pid being logged shall be obtained from the log socket itself. If so, the TAG part of the message is rewritten. It is recommended to turn this option on, but the default is "off" to keep compatible @@ -150,7 +155,7 @@ $SystemLogRateLimitInterval 0 # turn off rate limiting

    This documentation is part of the rsyslog project.
    -Copyright © 2008-2010 by Rainer +Copyright © 2008-2012 by Rainer Gerhards and Adiscon. Released under the GNU GPL version 3 or higher.

    diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c index 4523798f..ad8c81e7 100644 --- a/plugins/imuxsock/imuxsock.c +++ b/plugins/imuxsock/imuxsock.c @@ -89,6 +89,7 @@ DEF_IMOD_STATIC_DATA DEFobjCurrIf(errmsg) DEFobjCurrIf(glbl) DEFobjCurrIf(prop) +DEFobjCurrIf(net) DEFobjCurrIf(parser) DEFobjCurrIf(datetime) DEFobjCurrIf(statsobj) @@ -157,6 +158,7 @@ static int sd_fds = 0; /* number of systemd activated sockets */ /* config settings */ static int bOmitLocalLogging = 0; static uchar *pLogSockName = NULL; +static uchar *pLocalIPIF = NULL; static uchar *pLogHostName = NULL; /* host name to use with this socket */ static int bUseFlowCtl = 0; /* use flow control or not (if yes, only LIGHT is used! */ static int bIgnoreTimestamp = 1; /* ignore timestamps present in the incoming message? */ @@ -764,6 +766,8 @@ ENDrunInput BEGINwillRun + uchar myIP[128]; + rsRetVal localRet; CODESTARTwillRun register int i; int actSocks; @@ -784,7 +788,7 @@ CODESTARTwillRun else if(sd_booted()) { struct stat st; if(stat(SYSTEMD_JOURNAL, &st) != -1 && S_ISDIR(st.st_mode)) { - listeners[0].sockName = SYSTEMD_PATH_LOG; + listeners[0].sockName = (uchar*)SYSTEMD_PATH_LOG; } } if(ratelimitIntervalSysSock > 0) { @@ -826,6 +830,23 @@ CODESTARTwillRun CHKiRet(prop.SetString(pInputName, UCHAR_CONSTANT("imuxsock"), sizeof("imuxsock") - 1)); CHKiRet(prop.ConstructFinalize(pInputName)); + if(pLocalIPIF == NULL) { + strcpy((char*)myIP, "127.0.0.1"); + } else { + localRet = net.GetIFIPAddr((uchar*)"eth0", AF_UNSPEC, myIP, (int) sizeof(myIP)); + if(localRet != RS_RET_OK) { + DBGPRINTF("imuxsock: could not obtain my IP, using 127.0.0.1 instead\n"); + strcpy((char*)myIP, "127.0.0.1"); + } + } + + DBGPRINTF("imuxsock: using '%s' as localhost IP\n", myIP); + + CHKiRet(prop.Construct(&pLocalHostIP)); + CHKiRet(prop.SetString(pLocalHostIP, myIP, ustrlen(myIP))); + CHKiRet(prop.ConstructFinalize(pLocalHostIP)); + + finalize_it: ENDwillRun @@ -857,6 +878,7 @@ CODESTARTafterRun } /* free no longer needed string */ free(pLogSockName); + free(pLocalIPIF); free(pLogHostName); discardLogSockets(); @@ -901,6 +923,10 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a free(pLogSockName); pLogSockName = NULL; } + if(pLocalIPIF != NULL) { + free(pLocalIPIF); + pLocalIPIF = NULL; + } if(pLogHostName != NULL) { free(pLogHostName); pLogHostName = NULL; @@ -931,6 +957,7 @@ CODESTARTmodInit CODEmodInit_QueryRegCFSLineHdlr CHKiRet(objUse(errmsg, CORE_COMPONENT)); CHKiRet(objUse(glbl, CORE_COMPONENT)); + CHKiRet(objUse(net, CORE_COMPONENT)); CHKiRet(objUse(prop, CORE_COMPONENT)); CHKiRet(objUse(statsobj, CORE_COMPONENT)); CHKiRet(objUse(datetime, CORE_COMPONENT)); @@ -954,10 +981,6 @@ CODEmodInit_QueryRegCFSLineHdlr listeners[i].fd = -1; } - CHKiRet(prop.Construct(&pLocalHostIP)); - CHKiRet(prop.SetString(pLocalHostIP, UCHAR_CONSTANT("127.0.0.1"), sizeof("127.0.0.1") - 1)); - CHKiRet(prop.ConstructFinalize(pLocalHostIP)); - /* now init listen socket zero, the local log socket */ CHKiRet(prop.Construct(&(listeners[0].hostName))); CHKiRet(prop.SetString(listeners[0].hostName, glbl.GetLocalHostName(), ustrlen(glbl.GetLocalHostName()))); @@ -988,6 +1011,8 @@ CODEmodInit_QueryRegCFSLineHdlr NULL, &ratelimitSeverity, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID)); + CHKiRet(omsdRegCFSLineHdlr((uchar *)"imuxsocklocalipif", 0, eCmdHdlrGetWord, + NULL, &pLocalIPIF, STD_LOADABLE_MODULE_ID)); /* the following one is a (dirty) trick: the system log socket is not added via * an "addUnixListenSocket" config format. As such, it's properties can not be modified * via $InputUnixListenSocket*". So we need to add a special directive diff --git a/runtime/net.c b/runtime/net.c index 4781739f..1264b2cb 100644 --- a/runtime/net.c +++ b/runtime/net.c @@ -12,7 +12,7 @@ * long term, but it is good to have it out of syslogd.c. Maybe this here is * an interim location ;) * - * Copyright 2007, 2008 Rainer Gerhards and Adiscon GmbH. + * Copyright 2007-2012 Rainer Gerhards and Adiscon GmbH. * * rgerhards, 2008-04-16: I changed this code to LGPL today. I carefully analyzed * that it does not borrow code from the original sysklogd and that I have @@ -54,6 +54,9 @@ #include #include #include +#include +#include +#include #include "syslogd-types.h" #include "module-template.h" @@ -1581,6 +1584,54 @@ finalize_it: } +/* return the IP address (IPv4/6) for the provided interface. Returns + * RS_RET_NOT_FOUND if interface can not be found in interface list. + * The family must be correct (AF_INET vs. AF_INET6, AF_UNSPEC means + * either of *these two*). + * The function re-queries the interface list (at least in theory). + * However, it caches entries in order to avoid too-frequent requery. + * rgerhards, 2012-03-06 + */ +static rsRetVal +getIFIPAddr(uchar *szif, int family, uchar *pszbuf, int lenBuf) +{ + struct ifaddrs * ifaddrs = NULL; + struct ifaddrs * ifa; + void * pAddr; + DEFiRet; + + if(getifaddrs(&ifaddrs) != 0) { + ABORT_FINALIZE(RS_RET_ERR); + } + + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { + if(strcmp(ifa->ifa_name, (char*)szif)) + continue; + if( (family == AF_INET6 || family == AF_UNSPEC) + && ifa->ifa_addr->sa_family == AF_INET6) { + pAddr = &((struct sockaddr_in6 *)ifa->ifa_addr)->sin6_addr; + inet_ntop(AF_INET6, pAddr, (char*)pszbuf, lenBuf); + break; + } else if(/* (family == AF_INET || family == AF_UNSPEC) + &&*/ ifa->ifa_addr->sa_family == AF_INET) { + pAddr = &((struct sockaddr_in *)ifa->ifa_addr)->sin_addr; + inet_ntop(AF_INET, pAddr, (char*)pszbuf, lenBuf); + break; + } + } + + if(ifaddrs != NULL) + freeifaddrs(ifaddrs); + + if(ifa == NULL) + iRet = RS_RET_NOT_FOUND; + +finalize_it: + RETiRet; + +} + + /* queryInterface function * rgerhards, 2008-03-05 */ @@ -1612,6 +1663,7 @@ CODESTARTobjQueryInterface(net) pIf->PermittedPeerWildcardMatch = PermittedPeerWildcardMatch; pIf->CmpHost = CmpHost; pIf->HasRestrictions = HasRestrictions; + pIf->GetIFIPAddr = getIFIPAddr; /* data members */ pIf->pACLAddHostnameOnFail = &ACLAddHostnameOnFail; pIf->pACLDontResolve = &ACLDontResolve; diff --git a/runtime/net.h b/runtime/net.h index 101ce79d..1b41c81c 100644 --- a/runtime/net.h +++ b/runtime/net.h @@ -1,6 +1,6 @@ /* Definitions for network-related stuff. * - * Copyright 2007, 2008 Rainer Gerhards and Adiscon GmbH. + * Copyright 2007-2012 Rainer Gerhards and Adiscon GmbH. * * This file is part of the rsyslog runtime library. * @@ -151,11 +151,13 @@ BEGINinterface(net) /* name must also be changed in ENDinterface macro! */ /* v6 interface additions - 2009-11-16 */ rsRetVal (*HasRestrictions)(uchar *, int *bHasRestrictions); int (*isAllowedSender2)(uchar *pszType, struct sockaddr *pFrom, const char *pszFromHost, int bChkDNS); + /* v7 interface additions - 2012-03-06 */ + rsRetVal (*GetIFIPAddr)(uchar *szif, int family, uchar *pszbuf, int lenBuf); /* data members - these should go away over time... TODO */ int *pACLAddHostnameOnFail; /* add hostname to acl when DNS resolving has failed */ int *pACLDontResolve; /* add hostname to acl instead of resolving it to IP(s) */ ENDinterface(net) -#define netCURR_IF_VERSION 6 /* increment whenever you change the interface structure! */ +#define netCURR_IF_VERSION 7 /* increment whenever you change the interface structure! */ /* prototypes */ PROTOTYPEObj(net); diff --git a/tools/syslogd.c b/tools/syslogd.c index c0e663d2..02a0dad6 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -2712,6 +2712,7 @@ int realMain(int argc, char **argv) CHKmalloc(LocalHostName = (uchar*)strdup(hent->h_aliases[i])); } else { CHKmalloc(LocalHostName = (uchar*)strdup(hent->h_name)); + int i; } if((p = (uchar*)strchr((char*)LocalHostName, '.'))) -- cgit From f993008207811affe8fc52800e408bea241e78e3 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 9 Mar 2012 16:39:08 +0100 Subject: bugfix: imudp: only two listeners were activated no matter how many were defined. Note that IPv4 and IPv6 count as two! --- plugins/imudp/imudp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index 0db6bf9a..112738b4 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -244,8 +244,10 @@ static rsRetVal addListner(void __attribute__((unused)) *pVal, uchar *pNewVal) lcnfRoot = newlcnfinfo; if(lcnfLast == NULL) lcnfLast = newlcnfinfo; - else + else { lcnfLast->next = newlcnfinfo; + lcnfLast = newlcnfinfo; + } } } -- cgit From 68301c98db00dc1b6bc7e09c5f5e47286a16ab95 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Sat, 10 Mar 2012 18:22:14 +0100 Subject: imuxsock did ignore configured IP if - always used eth0 if one was set ;) --- plugins/imuxsock/imuxsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c index ad8c81e7..2f76ed87 100644 --- a/plugins/imuxsock/imuxsock.c +++ b/plugins/imuxsock/imuxsock.c @@ -833,7 +833,7 @@ CODESTARTwillRun if(pLocalIPIF == NULL) { strcpy((char*)myIP, "127.0.0.1"); } else { - localRet = net.GetIFIPAddr((uchar*)"eth0", AF_UNSPEC, myIP, (int) sizeof(myIP)); + localRet = net.GetIFIPAddr((uchar*)pLocalIPIF, AF_UNSPEC, myIP, (int) sizeof(myIP)); if(localRet != RS_RET_OK) { DBGPRINTF("imuxsock: could not obtain my IP, using 127.0.0.1 instead\n"); strcpy((char*)myIP, "127.0.0.1"); -- cgit From 50a94aa1c72ba8aab5443ecc04b51190da0df513 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Sat, 10 Mar 2012 18:29:40 +0100 Subject: added capability to use a local interface IP address as fromhost-ip for imklog --- ChangeLog | 4 ++-- doc/imklog.html | 5 +++++ doc/imuxsock.html | 2 +- plugins/imklog/imklog.c | 27 ++++++++++++++++++++++++++- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78f74695..9fb59495 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ - added capability to use a local interface IP address as fromhost-ip for - imuxsock - new config directives: $IMUXSockLocalIPIF + imuxsock imklog + new config directives: $IMUXSockLocalIPIF, $klogLocalIPIF - added configuration directives to customize queue light delay marks $MainMsgQueueLightDelayMark, $ActionQueueLightDelayMark; both specify number of messages starting at which a delay happens. diff --git a/doc/imklog.html b/doc/imklog.html index f273753f..2e3b3bc2 100644 --- a/doc/imklog.html +++ b/doc/imklog.html @@ -36,6 +36,11 @@ processing.
  • $DebugPrintKernelSymbols [on/off]
    Linux only, ignored on other platforms (but may be specified)
  • +
  • $klogLocalIPIF [interface name] - (available since 5.9.6) - if provided, the IP of the specified +interface (e.g. "eth0") shall be used as fromhost-ip for imklog-originating messages. +If this directive is not given OR the interface cannot be found (or has no IP address), +the default of "127.0.0.1" is used. +
  • $klogSymbolLookup [on/off] -- disables imklog kernel symbol translation (former klogd -x option). NOTE that this option is counter-productive on recent kernels (>= 2.6) because the diff --git a/doc/imuxsock.html b/doc/imuxsock.html index 1b79dd0d..f54b5564 100644 --- a/doc/imuxsock.html +++ b/doc/imuxsock.html @@ -64,7 +64,7 @@ burst in number of messages. Default is 200.
  • $IMUXSockRateLimitSeverity [numerical severity] - specifies the severity of messages that shall be rate-limited.
  • -
  • $IMUXSockLocalIPIF [interface name] - if provided, the IP of the specified +
  • $IMUXSockLocalIPIF [interface name] - (available since 5.9.6) - if provided, the IP of the specified interface (e.g. "eth0") shall be used as fromhost-ip for imuxsock-originating messages. If this directive is not given OR the interface cannot be found (or has no IP address), the default of "127.0.0.1" is used. diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c index 16adbc21..66d7d143 100644 --- a/plugins/imklog/imklog.c +++ b/plugins/imklog/imklog.c @@ -44,6 +44,7 @@ #include #include #include +#include #include "dirty.h" #include "cfsysline.h" @@ -52,6 +53,7 @@ #include "module-template.h" #include "datetime.h" #include "imklog.h" +#include "net.h" #include "glbl.h" #include "prop.h" #include "unicode-helper.h" @@ -64,6 +66,7 @@ DEF_IMOD_STATIC_DATA DEFobjCurrIf(datetime) DEFobjCurrIf(glbl) DEFobjCurrIf(prop) +DEFobjCurrIf(net) /* configuration settings */ int dbgPrintSymbols = 0; /* this one is extern so the helpers can access it! */ @@ -71,6 +74,7 @@ int symbols_twice = 0; int use_syscall = 0; int symbol_lookup = 0; /* on recent kernels > 2.6, the kernel does this */ int bPermitNonKernel = 0; /* permit logging of messages not having LOG_KERN facility */ +static uchar *pLocalIPIF = NULL; int iFacilIntMsg; /* the facility to use for internal messages (set by driver) */ uchar *pszPath = NULL; int console_log_level = -1; @@ -233,10 +237,22 @@ ENDrunInput BEGINwillRun + uchar myIP[128]; + rsRetVal localRet; CODESTARTwillRun /* we need to create the inputName property (only once during our lifetime) */ CHKiRet(prop.CreateStringProp(&pInputName, UCHAR_CONSTANT("imklog"), sizeof("imklog") - 1)); - CHKiRet(prop.CreateStringProp(&pLocalHostIP, UCHAR_CONSTANT("127.0.0.1"), sizeof("127.0.0.1") - 1)); + if(pLocalIPIF == NULL) { + strcpy((char*)myIP, "127.0.0.1"); + } else { + localRet = net.GetIFIPAddr(pLocalIPIF, AF_UNSPEC, myIP, (int) sizeof(myIP)); + if(localRet != RS_RET_OK) { + DBGPRINTF("imuxsock: could not obtain my IP, using 127.0.0.1 instead\n"); + strcpy((char*)myIP, "127.0.0.1"); + } + } + DBGPRINTF("imklog: using '%s' as localhost IP\n", myIP); + CHKiRet(prop.CreateStringProp(&pLocalHostIP, myIP, ustrlen(myIP))); iRet = klogWillRun(); finalize_it: @@ -251,6 +267,7 @@ CODESTARTafterRun prop.Destruct(&pInputName); if(pLocalHostIP != NULL) prop.Destruct(&pLocalHostIP); + free(pLocalIPIF); ENDafterRun @@ -258,6 +275,7 @@ BEGINmodExit CODESTARTmodExit /* release objects we used */ objRelease(glbl, CORE_COMPONENT); + objRelease(net, CORE_COMPONENT); objRelease(datetime, CORE_COMPONENT); objRelease(prop, CORE_COMPONENT); if(pszPath != NULL) @@ -282,6 +300,10 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a free(pszPath); pszPath = NULL; } + if(pLocalIPIF != NULL) { + free(pLocalIPIF); + pLocalIPIF = NULL; + } iFacilIntMsg = klogFacilIntMsg(); return RS_RET_OK; } @@ -293,6 +315,7 @@ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(objUse(datetime, CORE_COMPONENT)); CHKiRet(objUse(glbl, CORE_COMPONENT)); CHKiRet(objUse(prop, CORE_COMPONENT)); + CHKiRet(objUse(net, CORE_COMPONENT)); iFacilIntMsg = klogFacilIntMsg(); @@ -304,6 +327,8 @@ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogpermitnonkernelfacility", 0, eCmdHdlrBinary, NULL, &bPermitNonKernel, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogconsoleloglevel", 0, eCmdHdlrInt, NULL, &console_log_level, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"kloginternalmsgfacility", 0, eCmdHdlrFacility, NULL, &iFacilIntMsg, STD_LOADABLE_MODULE_ID)); + CHKiRet(omsdRegCFSLineHdlr((uchar *)"kloglocalipif", 0, eCmdHdlrGetWord, + NULL, &pLocalIPIF, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID)); ENDmodInit /* vim:set ai: -- cgit From 5ecfdad17e395570edb78698b4805992368c61b1 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 12 Mar 2012 16:56:51 +0100 Subject: bumped version number (of temp branch) --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2e070386..b38a1955 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([rsyslog],[5.8.8-newstats9],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[5.8.8-newstats10],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -- cgit From 7d516b0a6c46177c18aea30b4617f1d2712d48fd Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 14 Mar 2012 13:51:18 +0100 Subject: added missing initialization of stats counters this was necessary due to refactoring of the stats subsystem ... but should have been done in the first place when this code was written. Thanks to Kaiwang Chen for his analysis of the stats subsystem, which ultimately lead to this patch! --- plugins/imptcp/imptcp.c | 1 + plugins/imudp/imudp.c | 1 + tcpsrv.c | 1 + 3 files changed, 3 insertions(+) diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c index e191c64f..9c6c64e4 100644 --- a/plugins/imptcp/imptcp.c +++ b/plugins/imptcp/imptcp.c @@ -775,6 +775,7 @@ addLstn(ptcpsrv_t *pSrv, int sock, int isIPv6) isIPv6 ? "IPv6" : "IPv4"); statname[sizeof(statname)-1] = '\0'; /* just to be on the save side... */ CHKiRet(statsobj.SetName(pLstn->stats, statname)); + STATSCOUNTER_INIT(pLstn->ctrSubmit, pLstn->mutCtrSubmit); CHKiRet(statsobj.AddCounter(pLstn->stats, UCHAR_CONSTANT("submitted"), ctrType_IntCtr, &(pLstn->ctrSubmit))); CHKiRet(statsobj.ConstructFinalize(pLstn->stats)); diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index 112738b4..46631e97 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -234,6 +234,7 @@ static rsRetVal addListner(void __attribute__((unused)) *pVal, uchar *pNewVal) snprintf((char*)statname, sizeof(statname), "imudp(%s:%s)", bindName, port); statname[sizeof(statname)-1] = '\0'; /* just to be on the save side... */ CHKiRet(statsobj.SetName(newlcnfinfo->stats, statname)); + STATSCOUNTER_INIT(newlcnfinfo->ctrSubmit, newlcnfinfo->mutCtrSubmit); CHKiRet(statsobj.AddCounter(newlcnfinfo->stats, UCHAR_CONSTANT("submitted"), ctrType_IntCtr, &(newlcnfinfo->ctrSubmit))); CHKiRet(statsobj.ConstructFinalize(newlcnfinfo->stats)); diff --git a/tcpsrv.c b/tcpsrv.c index 86175ff4..dcf407c0 100644 --- a/tcpsrv.c +++ b/tcpsrv.c @@ -128,6 +128,7 @@ addNewLstnPort(tcpsrv_t *pThis, uchar *pszPort) snprintf((char*)statname, sizeof(statname), "%s(%s)", pThis->pszInputName, pszPort); statname[sizeof(statname)-1] = '\0'; /* just to be on the save side... */ CHKiRet(statsobj.SetName(pEntry->stats, statname)); + STATSCOUNTER_INIT(pEntry->ctrSubmit, pEntry->mutCtrSubmit); CHKiRet(statsobj.AddCounter(pEntry->stats, UCHAR_CONSTANT("submitted"), ctrType_IntCtr, &(pEntry->ctrSubmit))); CHKiRet(statsobj.ConstructFinalize(pEntry->stats)); -- cgit From 4fb7ba113c4d4afd485feb2729c5ff67bc8ddd4a Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 19 Mar 2012 15:28:25 +0100 Subject: added configuration directive to disable octet-counted framing ... for imtcp, directive is $InputTCPServerSupportOctetCountedFraming --- ChangeLog | 2 ++ doc/imtcp.html | 6 ++++++ plugins/imdiag/imdiag.c | 3 ++- plugins/imgssapi/imgssapi.c | 2 +- plugins/imtcp/imtcp.c | 6 +++++- tcps_sess.c | 4 +++- tcps_sess.h | 3 ++- tcpsrv.c | 7 ++++--- tcpsrv.h | 6 ++++-- 9 files changed, 29 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48ef8884..775e7e3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +- added configuration directive to disable octet-counted framing + for imtcp, directive is $InputTCPServerSupportOctetCountedFraming - added capability to use a local interface IP address as fromhost-ip for imuxsock imklog new config directives: $IMUXSockLocalIPIF, $klogLocalIPIF diff --git a/doc/imtcp.html b/doc/imtcp.html index 422bbd55..cd10f712 100644 --- a/doc/imtcp.html +++ b/doc/imtcp.html @@ -74,6 +74,12 @@ listener. <id-string> semantics depend on the currently selected AuthMode and  network stream driver. PermittedPeers may not be set in anonymous modes.
  • $InputTCPServerBindRuleset <ruleset>
    Binds the listener to a specific ruleset.
  • +
  • $InputTCPSupportOctetCountedFraming <on|off>
    +If set to "on", the legacy octed-counted framing (similar to RFC5425 framing) is +activated. This is the default and should be left unchanged until you know +very well what you do. It may be useful to turn it off, if you know this framing +is not used and some senders emit multi-line messages into the message stream. +
  • Caveats/Known Bugs:
      diff --git a/plugins/imdiag/imdiag.c b/plugins/imdiag/imdiag.c index b3468921..bcbbab09 100644 --- a/plugins/imdiag/imdiag.c +++ b/plugins/imdiag/imdiag.c @@ -376,7 +376,8 @@ static rsRetVal addTCPListener(void __attribute__((unused)) *pVal, uchar *pNewVa /* initialized, now add socket */ CHKiRet(tcpsrv.SetInputName(pOurTcpsrv, pszInputName == NULL ? UCHAR_CONSTANT("imdiag") : pszInputName)); - tcpsrv.configureTCPListen(pOurTcpsrv, pNewVal); + /* we support octect-cuunted frame (constant 1 below) */ + tcpsrv.configureTCPListen(pOurTcpsrv, pNewVal, 1); finalize_it: if(iRet != RS_RET_OK) { diff --git a/plugins/imgssapi/imgssapi.c b/plugins/imgssapi/imgssapi.c index 446795d6..cc969aa5 100644 --- a/plugins/imgssapi/imgssapi.c +++ b/plugins/imgssapi/imgssapi.c @@ -335,7 +335,7 @@ addGSSListener(void __attribute__((unused)) *pVal, uchar *pNewVal) CHKiRet(tcpsrv.SetCBOnRegularClose(pOurTcpsrv, onRegularClose)); CHKiRet(tcpsrv.SetCBOnErrClose(pOurTcpsrv, onErrClose)); CHKiRet(tcpsrv.SetInputName(pOurTcpsrv, UCHAR_CONSTANT("imgssapi"))); - tcpsrv.configureTCPListen(pOurTcpsrv, pNewVal); + tcpsrv.configureTCPListen(pOurTcpsrv, pNewVal, 1); CHKiRet(tcpsrv.ConstructFinalize(pOurTcpsrv)); } diff --git a/plugins/imtcp/imtcp.c b/plugins/imtcp/imtcp.c index 6ab39477..2239d0f4 100644 --- a/plugins/imtcp/imtcp.c +++ b/plugins/imtcp/imtcp.c @@ -83,6 +83,7 @@ static permittedPeers_t *pPermPeersRoot = NULL; /* config settings */ static int iTCPSessMax = 200; /* max number of sessions */ +static int bSuppOctetFram = 1; /* octet counted TCP framing supported? */ static int iTCPLstnMax = 20; /* max number of sessions */ static int iStrmDrvrMode = 0; /* mode for stream driver, driver-dependent (0 mostly means plain tcp) */ static int bEmitMsgOnClose = 0; /* emit an informational message on close by remote peer */ @@ -215,7 +216,7 @@ static rsRetVal addTCPListener(void __attribute__((unused)) *pVal, uchar *pNewVa CHKiRet(tcpsrv.SetRuleset(pOurTcpsrv, pBindRuleset)); CHKiRet(tcpsrv.SetInputName(pOurTcpsrv, pszInputName == NULL ? UCHAR_CONSTANT("imtcp") : pszInputName)); - tcpsrv.configureTCPListen(pOurTcpsrv, pNewVal); + tcpsrv.configureTCPListen(pOurTcpsrv, pNewVal, bSuppOctetFram); finalize_it: if(iRet != RS_RET_OK) { @@ -287,6 +288,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal) { iTCPSessMax = 200; + bSuppOctetFram = 1; iTCPLstnMax = 20; iStrmDrvrMode = 0; bEmitMsgOnClose = 0; @@ -324,6 +326,8 @@ CODEmodInit_QueryRegCFSLineHdlr /* register config file handlers */ CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpserverrun"), 0, eCmdHdlrGetWord, addTCPListener, NULL, STD_LOADABLE_MODULE_ID)); + CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpserversupportoctetcountedframing"), 0, eCmdHdlrBinary, + NULL, &bSuppOctetFram, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpmaxsessions"), 0, eCmdHdlrInt, NULL, &iTCPSessMax, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputtcpmaxlisteners"), 0, eCmdHdlrInt, diff --git a/tcps_sess.c b/tcps_sess.c index 854d3742..87de6c01 100644 --- a/tcps_sess.c +++ b/tcps_sess.c @@ -199,6 +199,8 @@ SetLstnInfo(tcps_sess_t *pThis, tcpLstnPortList_t *pLstnInfo) ISOBJ_TYPE_assert(pThis, tcps_sess); assert(pLstnInfo != NULL); pThis->pLstnInfo = pLstnInfo; + /* set cached elements */ + pThis->bSuppOctetFram = pLstnInfo->bSuppOctetFram; RETiRet; } @@ -363,7 +365,7 @@ processDataRcvd(tcps_sess_t *pThis, char c, struct syslogTime *stTime, time_t tt ISOBJ_TYPE_assert(pThis, tcps_sess); if(pThis->inputState == eAtStrtFram) { - if(isdigit((int) c)) { + if(pThis->bSuppOctetFram && isdigit((int) c)) { pThis->inputState = eInOctetCnt; pThis->iOctetsRemain = 0; pThis->eFraming = TCP_FRAMING_OCTET_COUNTING; diff --git a/tcps_sess.h b/tcps_sess.h index 0799db99..054ce397 100644 --- a/tcps_sess.h +++ b/tcps_sess.h @@ -35,7 +35,8 @@ struct tcps_sess_s { tcpLstnPortList_t *pLstnInfo; /* pointer back to listener info */ netstrm_t *pStrm; int iMsg; /* index of next char to store in msg */ - int bAtStrtOfFram; /* are we at the very beginning of a new frame? */ + sbool bAtStrtOfFram; /* are we at the very beginning of a new frame? */ + sbool bSuppOctetFram; /**< copy from listener, to speed up access */ enum { eAtStrtFram, eInOctetCnt, diff --git a/tcpsrv.c b/tcpsrv.c index dcf407c0..d5853477 100644 --- a/tcpsrv.c +++ b/tcpsrv.c @@ -100,7 +100,7 @@ DEFobjCurrIf(statsobj) * rgerhards, 2009-05-21 */ static inline rsRetVal -addNewLstnPort(tcpsrv_t *pThis, uchar *pszPort) +addNewLstnPort(tcpsrv_t *pThis, uchar *pszPort, int bSuppOctetFram) { tcpLstnPortList_t *pEntry; uchar statname[64]; @@ -113,6 +113,7 @@ addNewLstnPort(tcpsrv_t *pThis, uchar *pszPort) pEntry->pszPort = pszPort; pEntry->pSrv = pThis; pEntry->pRuleset = pThis->pRuleset; + pEntry->bSuppOctetFram = bSuppOctetFram; /* we need to create a property */ CHKiRet(prop.Construct(&pEntry->pInputName)); @@ -143,7 +144,7 @@ finalize_it: * rgerhards, 2008-03-20 */ static rsRetVal -configureTCPListen(tcpsrv_t *pThis, uchar *pszPort) +configureTCPListen(tcpsrv_t *pThis, uchar *pszPort, int bSuppOctetFram) { int i; uchar *pPort = pszPort; @@ -159,7 +160,7 @@ configureTCPListen(tcpsrv_t *pThis, uchar *pszPort) } if(i >= 0 && i <= 65535) { - CHKiRet(addNewLstnPort(pThis, pszPort)); + CHKiRet(addNewLstnPort(pThis, pszPort, bSuppOctetFram)); } else { errmsg.LogError(0, NO_ERRCODE, "Invalid TCP listen port %s - ignored.\n", pszPort); } diff --git a/tcpsrv.h b/tcpsrv.h index f958f917..0b405306 100644 --- a/tcpsrv.h +++ b/tcpsrv.h @@ -41,6 +41,7 @@ struct tcpLstnPortList_s { tcpsrv_t *pSrv; /**< pointer to higher-level server instance */ ruleset_t *pRuleset; /**< associated ruleset */ statsobj_t *stats; /**< associated stats object */ + sbool bSuppOctetFram; /**< do we support octect-counted framing? (if no->legay only!)*/ STATSCOUNTER_DEF(ctrSubmit, mutCtrSubmit) tcpLstnPortList_t *pNext; /**< next port or NULL */ }; @@ -91,7 +92,7 @@ BEGINinterface(tcpsrv) /* name must also be changed in ENDinterface macro! */ rsRetVal (*Construct)(tcpsrv_t **ppThis); rsRetVal (*ConstructFinalize)(tcpsrv_t __attribute__((unused)) *pThis); rsRetVal (*Destruct)(tcpsrv_t **ppThis); - rsRetVal (*configureTCPListen)(tcpsrv_t*, uchar *pszPort); + rsRetVal (*configureTCPListen)(tcpsrv_t*, uchar *pszPort, int bSuppOctetFram); //rsRetVal (*SessAccept)(tcpsrv_t *pThis, tcpLstnPortList_t*, tcps_sess_t **ppSess, netstrm_t *pStrm); rsRetVal (*create_tcp_socket)(tcpsrv_t *pThis); rsRetVal (*Run)(tcpsrv_t *pThis); @@ -124,11 +125,12 @@ BEGINinterface(tcpsrv) /* name must also be changed in ENDinterface macro! */ /* added v9 -- rgerhards, 2010-03-01 */ rsRetVal (*SetbDisableLFDelim)(tcpsrv_t*, int); ENDinterface(tcpsrv) -#define tcpsrvCURR_IF_VERSION 9 /* increment whenever you change the interface structure! */ +#define tcpsrvCURR_IF_VERSION 10 /* increment whenever you change the interface structure! */ /* change for v4: * - SetAddtlFrameDelim() added -- rgerhards, 2008-12-10 * - SetInputName() added -- rgerhards, 2008-12-10 * change for v5 and up: see above + * for v10: param bSuppOctetFram added to configureTCPListen */ -- cgit From c6714bc496a2aaf356d8625784f10168d33859a3 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 20 Mar 2012 14:11:18 +0100 Subject: added configuration directive to disable octet-counted framing for imptcp, directive is $InputPTCPServerSupportOctetCountedFraming --- ChangeLog | 1 + doc/imptcp.html | 6 ++++++ plugins/imptcp/imptcp.c | 17 ++++++++++++++--- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 775e7e3f..f2a4e865 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ - added configuration directive to disable octet-counted framing for imtcp, directive is $InputTCPServerSupportOctetCountedFraming + for imptcp, directive is $InputPTCPServerSupportOctetCountedFraming - added capability to use a local interface IP address as fromhost-ip for imuxsock imklog new config directives: $IMUXSockLocalIPIF, $klogLocalIPIF diff --git a/doc/imptcp.html b/doc/imptcp.html index d4228185..87d81a0c 100644 --- a/doc/imptcp.html +++ b/doc/imptcp.html @@ -43,6 +43,12 @@ very limited interest in fixing this issue. This directive can not fix th That would require much more code changes, which I was unable to do so far. Full details can be found at the Cisco tcp syslog anomaly page. +
    • $InputPTCPSupportOctetCountedFraming <on|off>
      +If set to "on", the legacy octed-counted framing (similar to RFC5425 framing) is +activated. This is the default and should be left unchanged until you know +very well what you do. It may be useful to turn it off, if you know this framing +is not used and some senders emit multi-line messages into the message stream. +
    • $InputPTCPServerNotifyOnConnectionClose [on/off]
      instructs imptcp to emit a message if the remote peer closes a connection.
    • $InputPTCPServerRun <port>
      diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c index 9c6c64e4..3973041b 100644 --- a/plugins/imptcp/imptcp.c +++ b/plugins/imptcp/imptcp.c @@ -89,6 +89,7 @@ DEFobjCurrIf(statsobj) /* config settings */ typedef struct configSettings_s { int bEmitMsgOnClose; /* emit an informational message on close by remote peer */ + int bSuppOctetFram; /* support octet-counted framing? */ int iAddtlFrameDelim; /* addtl frame delimiter, e.g. for netscreen, default none */ uchar *pszInputName; /* value for inputname property, NULL is OK and handled by core engine */ uchar *lstnIP; /* which IP we should listen on? */ @@ -111,7 +112,8 @@ struct ptcpsrv_s { ptcpsrv_t *pNext; /* linked list maintenance */ uchar *port; /* Port to listen to */ uchar *lstnIP; /* which IP we should listen on? */ - int bEmitMsgOnClose; + sbool bEmitMsgOnClose; + sbool bSuppOctetFram; int iAddtlFrameDelim; uchar *pszInputName; prop_t *pInputName; /* InputName in (fast to process) property format */ @@ -132,6 +134,7 @@ struct ptcpsess_s { //--- from tcps_sess.h int iMsg; /* index of next char to store in msg */ int bAtStrtOfFram; /* are we at the very beginning of a new frame? */ + sbool bSuppOctetFram; /**< copy from listener, to speed up access */ enum { eAtStrtFram, eInOctetCnt, @@ -152,6 +155,7 @@ struct ptcplstn_s { ptcpsrv_t *pSrv; /* our server */ ptcplstn_t *prev, *next; int sock; + sbool bSuppOctetFram; epolld_t *epd; statsobj_t *stats; /* listener stats */ STATSCOUNTER_DEF(ctrSubmit, mutCtrSubmit) @@ -551,7 +555,7 @@ processDataRcvd(ptcpsess_t *pThis, char c, struct syslogTime *stTime, time_t ttG DEFiRet; if(pThis->inputState == eAtStrtFram) { - if(isdigit((int) c)) { + if(pThis->bSuppOctetFram && isdigit((int) c)) { pThis->inputState = eInOctetCnt; pThis->iOctetsRemain = 0; pThis->eFraming = TCP_FRAMING_OCTET_COUNTING; @@ -690,6 +694,7 @@ static inline void initConfigSettings(void) { cs.bEmitMsgOnClose = 0; + cs.bSuppOctetFram = 1; cs.iAddtlFrameDelim = TCPSRV_NO_ADDTL_DELIMITER; cs.pszInputName = NULL; cs.pRuleset = NULL; @@ -705,7 +710,7 @@ addEPollSock(epolld_type_t typ, void *ptr, int sock, epolld_t **pEpd) DEFiRet; epolld_t *epd = NULL; - CHKmalloc(epd = malloc(sizeof(epolld_t))); + CHKmalloc(epd = calloc(sizeof(epolld_t), 1)); epd->typ = typ; epd->ptr = ptr; *pEpd = epd; @@ -767,6 +772,7 @@ addLstn(ptcpsrv_t *pSrv, int sock, int isIPv6) CHKmalloc(pLstn = malloc(sizeof(ptcplstn_t))); pLstn->pSrv = pSrv; + pLstn->bSuppOctetFram = pSrv->bSuppOctetFram; pLstn->sock = sock; /* support statistics gathering */ CHKiRet(statsobj.Construct(&(pLstn->stats))); @@ -807,6 +813,7 @@ addSess(ptcplstn_t *pLstn, int sock, prop_t *peerName, prop_t *peerIP) CHKmalloc(pSess->pMsg = malloc(iMaxLine * sizeof(uchar))); pSess->pLstn = pLstn; pSess->sock = sock; + pSess->bSuppOctetFram = pLstn->bSuppOctetFram; pSess->inputState = eAtStrtFram; pSess->iMsg = 0; pSess->bAtStrtOfFram = 1; @@ -907,6 +914,7 @@ static rsRetVal addTCPListener(void __attribute__((unused)) *pVal, uchar *pNewVa CHKmalloc(pSrv = malloc(sizeof(ptcpsrv_t))); pSrv->pSess = NULL; pSrv->pLstn = NULL; + pSrv->bSuppOctetFram = cs.bSuppOctetFram; pSrv->bEmitMsgOnClose = cs.bEmitMsgOnClose; pSrv->port = pNewVal; pSrv->iAddtlFrameDelim = cs.iAddtlFrameDelim; @@ -1172,6 +1180,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal) { cs.bEmitMsgOnClose = 0; + cs.bSuppOctetFram = 1; cs.iAddtlFrameDelim = TCPSRV_NO_ADDTL_DELIMITER; free(cs.pszInputName); cs.pszInputName = NULL; @@ -1205,6 +1214,8 @@ CODEmodInit_QueryRegCFSLineHdlr /* register config file handlers */ CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputptcpserverrun"), 0, eCmdHdlrGetWord, addTCPListener, NULL, STD_LOADABLE_MODULE_ID)); + CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputptcpserversupportoctetcountedframing"), 0, eCmdHdlrBinary, + NULL, &cs.bSuppOctetFram, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputptcpservernotifyonconnectionclose"), 0, eCmdHdlrBinary, NULL, &cs.bEmitMsgOnClose, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr(UCHAR_CONSTANT("inputptcpserveraddtlframedelimiter"), 0, eCmdHdlrInt, -- cgit From dbc2efa6bea0a0ca7ded6d4a5f0378da0aab6936 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 21 Mar 2012 11:35:23 +0100 Subject: do not provide weblink with meaningless (generic) error code --- runtime/errmsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/errmsg.c b/runtime/errmsg.c index 09246944..e3555c1f 100644 --- a/runtime/errmsg.c +++ b/runtime/errmsg.c @@ -84,13 +84,13 @@ LogError(int iErrno, int iErrCode, char *fmt, ... ) if(iErrno != 0) { rs_strerror_r(iErrno, errStr, sizeof(errStr)); - if(iErrCode == NO_ERRCODE) { + if(iErrCode == NO_ERRCODE || iErrCode == RS_RET_ERR) { snprintf(msg, sizeof(msg), "%s: %s", buf, errStr); } else { snprintf(msg, sizeof(msg), "%s: %s [try http://www.rsyslog.com/e/%d ]", buf, errStr, iErrCode * -1); } } else { - if(iErrCode == NO_ERRCODE) { + if(iErrCode == NO_ERRCODE || iErrCode == RS_RET_ERR) { snprintf(msg, sizeof(msg), "%s", buf); } else { snprintf(msg, sizeof(msg), "%s [try http://www.rsyslog.com/e/%d ]", buf, iErrCode * -1); -- cgit From 49ec54d36984b9e91da7bd41e56e65dac22ce830 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 21 Mar 2012 11:43:45 +0100 Subject: milestone: added capability to use a local interface IP address as fromhost-ip ... for locally originating messages. New directive $LocalHostIPIF. Note that not all modules yet support this new directive - next step... --- ChangeLog | 3 +- doc/rsyslog_conf_global.html | 13 +++++ plugins/impstats/impstats.c | 8 +-- runtime/glbl.c | 128 ++++++++++++++++++++++++++++++++----------- runtime/glbl.h | 32 +++++------ tools/syslogd.c | 11 +--- 6 files changed, 130 insertions(+), 65 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2a4e865..b9e56ec2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,8 +2,7 @@ for imtcp, directive is $InputTCPServerSupportOctetCountedFraming for imptcp, directive is $InputPTCPServerSupportOctetCountedFraming - added capability to use a local interface IP address as fromhost-ip for - imuxsock imklog - new config directives: $IMUXSockLocalIPIF, $klogLocalIPIF + locally originating messages. New directive $LocalHostIPIF - added configuration directives to customize queue light delay marks $MainMsgQueueLightDelayMark, $ActionQueueLightDelayMark; both specify number of messages starting at which a delay happens. diff --git a/doc/rsyslog_conf_global.html b/doc/rsyslog_conf_global.html index 21786a7f..86e4bab2 100644 --- a/doc/rsyslog_conf_global.html +++ b/doc/rsyslog_conf_global.html @@ -301,6 +301,19 @@ the value, the less precise the timestamp.
    • $Sleep <seconds> - puts the rsyslog main thread to sleep for the specified number of seconds immediately when the directive is encountered. You should have a good reason for using this directive!
    • +
    • $LocalHostIPIF <interface name> - (available since 5.9.6) - if provided, the IP of the specified +interface (e.g. "eth0") shall be used as fromhost-ip for locall-originating messages. +If this directive is not given OR the interface cannot be found (or has no IP address), +the default of "127.0.0.1" is used. Note that this directive can be given only +once. Trying to reset will result in an error message and the new value will +be ignored. Please note that modules must have support for obtaining the local +IP address set via this directive. While this is the case for rsyslog-provided +modules, it may not always be the case for contributed plugins. +
      Important: This directive shall be placed right at the top of +rsyslog.conf. Otherwise, if error messages are triggered before this directive +is processed, rsyslog will fix the local host IP to "127.0.0.1", what than can +not be reset. +
    • $UMASK

    Where <size_nbr> is specified above, diff --git a/plugins/impstats/impstats.c b/plugins/impstats/impstats.c index 3012136c..ba497e01 100644 --- a/plugins/impstats/impstats.c +++ b/plugins/impstats/impstats.c @@ -62,7 +62,6 @@ typedef struct configSettings_s { static configSettings_t cs; static prop_t *pInputName = NULL; -static prop_t *pLocalHostIP = NULL; BEGINisCompatibleWithFeature CODESTARTisCompatibleWithFeature @@ -92,7 +91,7 @@ doSubmitMsg(uchar *line) MsgSetRawMsgWOSize(pMsg, (char*)line); MsgSetHOSTNAME(pMsg, glbl.GetLocalHostName(), ustrlen(glbl.GetLocalHostName())); MsgSetRcvFrom(pMsg, glbl.GetLocalHostNameProp()); - MsgSetRcvFromIP(pMsg, pLocalHostIP); + MsgSetRcvFromIP(pMsg, glbl.GetLocalHostIP()); MsgSetMSGoffs(pMsg, 0); MsgSetTAG(pMsg, UCHAR_CONSTANT("rsyslogd-pstats:"), sizeof("rsyslogd-pstats:") - 1); pMsg->iFacility = cs.iFacility; @@ -169,7 +168,6 @@ ENDafterRun BEGINmodExit CODESTARTmodExit prop.Destruct(&pInputName); - prop.Destruct(&pLocalHostIP); /* release objects we used */ objRelease(glbl, CORE_COMPONENT); objRelease(prop, CORE_COMPONENT); @@ -212,10 +210,6 @@ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(prop.Construct(&pInputName)); CHKiRet(prop.SetString(pInputName, UCHAR_CONSTANT("impstats"), sizeof("impstats") - 1)); CHKiRet(prop.ConstructFinalize(pInputName)); - - CHKiRet(prop.Construct(&pLocalHostIP)); - CHKiRet(prop.SetString(pLocalHostIP, UCHAR_CONSTANT("127.0.0.1"), sizeof("127.0.0.1") - 1)); - CHKiRet(prop.ConstructFinalize(pLocalHostIP)); ENDmodInit /* vi:set ai: */ diff --git a/runtime/glbl.c b/runtime/glbl.c index dea5a17b..134e6c6e 100644 --- a/runtime/glbl.c +++ b/runtime/glbl.c @@ -7,25 +7,23 @@ * * Module begun 2008-04-16 by Rainer Gerhards * - * Copyright 2008 Rainer Gerhards and Adiscon GmbH. + * Copyright 2008-2012 Rainer Gerhards and Adiscon GmbH. * * This file is part of the rsyslog runtime library. * - * The rsyslog runtime library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * The rsyslog runtime library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with the rsyslog runtime library. If not, see . - * - * A copy of the GPL can be found in the file "COPYING" in this distribution. - * A copy of the LGPL can be found in the file "COPYING.LESSER" in this distribution. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * -or- + * see COPYING.ASL20 in the source distribution + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include "config.h" @@ -44,6 +42,7 @@ #include "prop.h" #include "atomic.h" #include "errmsg.h" +#include "net.h" /* some defaults */ #ifndef DFLT_NETSTRM_DRVR @@ -54,6 +53,7 @@ DEFobjStaticHelpers DEFobjCurrIf(prop) DEFobjCurrIf(errmsg) +DEFobjCurrIf(net) /* static data * For this object, these variables are obviously what makes the "meat" of the @@ -68,6 +68,7 @@ static int iDefPFFamily = PF_UNSPEC; /* protocol family (IPv4, IPv6 or both) static int bDropMalPTRMsgs = 0;/* Drop messages which have malicious PTR records during DNS lookup */ static int option_DisallowWarning = 1; /* complain if message from disallowed sender is received */ static int bDisableDNS = 0; /* don't look up IP addresses of remote messages */ +static prop_t *propLocalIPIF = NULL;/* IP address to report for the local host (default is 127.0.0.1) */ static prop_t *propLocalHostName = NULL;/* our hostname as FQDN - read-only after startup */ static uchar *LocalHostName = NULL;/* our hostname - read-only after startup */ static uchar *LocalHostNameOverride = NULL;/* user-overridden hostname - read-only after startup */ @@ -152,6 +153,60 @@ static void SetGlobalInputTermination(void) } +/* set the local host IP address to a specific string. Helper to + * small set of functions. No checks done, caller must ensure it is + * ok to call. Most importantly, the IP address must not already have + * been set. -- rgerhards, 2012-03-21 + */ +static inline rsRetVal +storeLocalHostIPIF(uchar *myIP) +{ + DEFiRet; + CHKiRet(prop.Construct(&propLocalIPIF)); + CHKiRet(prop.SetString(propLocalIPIF, myIP, ustrlen(myIP))); + CHKiRet(prop.ConstructFinalize(propLocalIPIF)); + DBGPRINTF("rsyslog/glbl: using '%s' as localhost IP\n", myIP); +finalize_it: + RETiRet; +} + + +/* This function is used to set the IP address that is to be + * reported for the local host. Note that in order to ease things + * for the v6 config interface, we do not allow to set this more + * than once. + * rgerhards, 2012-03-21 + */ +static rsRetVal +setLocalHostIPIF(void __attribute__((unused)) *pVal, uchar *pNewVal) +{ + uchar myIP[128]; + rsRetVal localRet; + DEFiRet; + + CHKiRet(objUse(net, CORE_COMPONENT)); + + if(propLocalIPIF != NULL) { + errmsg.LogError(0, RS_RET_ERR, "$LocalHostIPIF is already set " + "and cannot be reset; place it at TOP OF rsyslog.conf!"); + ABORT_FINALIZE(RS_RET_ERR_WRKDIR); + } + + localRet = net.GetIFIPAddr(pNewVal, AF_UNSPEC, myIP, (int) sizeof(myIP)); + if(localRet != RS_RET_OK) { + errmsg.LogError(0, RS_RET_ERR, "$LocalIPIF: IP address for interface " + "'%s' cannnot be obtained - ignoring directive", pNewVal); + } else { + storeLocalHostIPIF(myIP); + } + + +finalize_it: + free(pNewVal); /* no longer needed -> is in prop! */ + RETiRet; +} + + /* This function is used to set the global work directory name. * It verifies that the provided directory actually exists and * emits an error message if not. @@ -202,6 +257,22 @@ finalize_it: RETiRet; } +/* return our local IP. + * If no local IP is set, "127.0.0.1" is selected *and* set. This + * is an intensional side effect that we do in order to keep things + * consistent and avoid config errors (this will make us not accept + * setting the local IP address once a module has obtained it - so + * it forces the $LocalHostIPIF directive high up in rsyslog.conf) + * rgerhards, 2012-03-21 + */ +static prop_t* +GetLocalHostIP(void) +{ + if(propLocalIPIF == NULL) + storeLocalHostIPIF((uchar*)"127.0.0.1"); + return(propLocalIPIF); +} + /* return our local hostname. if it is not set, "[localhost]" is returned */ static uchar* @@ -338,6 +409,7 @@ CODESTARTobjQueryInterface(glbl) pIf->GetWorkDir = GetWorkDir; pIf->GenerateLocalHostNameProperty = GenerateLocalHostNameProperty; pIf->GetLocalHostNameProp = GetLocalHostNameProp; + pIf->GetLocalHostIP = GetLocalHostIP; pIf->SetGlobalInputTermination = SetGlobalInputTermination; pIf->GetGlobalInputTermState = GetGlobalInputTermState; #define SIMP_PROP(name) \ @@ -417,7 +489,7 @@ BEGINAbstractObjClassInit(glbl, 1, OBJ_IS_CORE_MODULE) /* class, version */ CHKiRet(objUse(prop, CORE_COMPONENT)); CHKiRet(objUse(errmsg, CORE_COMPONENT)); - /* register config handlers (TODO: we need to implement a way to unregister them) */ + /* config handlers are never unregistered and need not be - we are always loaded ;) */ CHKiRet(regCfSysLineHdlr((uchar *)"workdirectory", 0, eCmdHdlrGetWord, setWorkDir, NULL, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"dropmsgswithmaliciousdnsptrrecords", 0, eCmdHdlrBinary, NULL, &bDropMalPTRMsgs, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"defaultnetstreamdriver", 0, eCmdHdlrGetWord, NULL, &pszDfltNetstrmDrvr, NULL)); @@ -425,6 +497,7 @@ BEGINAbstractObjClassInit(glbl, 1, OBJ_IS_CORE_MODULE) /* class, version */ CHKiRet(regCfSysLineHdlr((uchar *)"defaultnetstreamdriverkeyfile", 0, eCmdHdlrGetWord, NULL, &pszDfltNetstrmDrvrKeyFile, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"defaultnetstreamdrivercertfile", 0, eCmdHdlrGetWord, NULL, &pszDfltNetstrmDrvrCertFile, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"localhostname", 0, eCmdHdlrGetWord, NULL, &LocalHostNameOverride, NULL)); + CHKiRet(regCfSysLineHdlr((uchar *)"localhostipif", 0, eCmdHdlrGetWord, setLocalHostIPIF, NULL, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"optimizeforuniprocessor", 0, eCmdHdlrBinary, NULL, &bOptimizeUniProc, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"preservefqdn", 0, eCmdHdlrBinary, NULL, &bPreserveFQDN, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, NULL)); @@ -437,21 +510,14 @@ ENDObjClassInit(glbl) * rgerhards, 2008-04-17 */ BEGINObjClassExit(glbl, OBJ_IS_CORE_MODULE) /* class, version */ - if(pszDfltNetstrmDrvr != NULL) - free(pszDfltNetstrmDrvr); - if(pszDfltNetstrmDrvrCAF != NULL) - free(pszDfltNetstrmDrvrCAF); - if(pszDfltNetstrmDrvrKeyFile != NULL) - free(pszDfltNetstrmDrvrKeyFile); - if(pszDfltNetstrmDrvrCertFile != NULL) - free(pszDfltNetstrmDrvrCertFile); - if(pszWorkDir != NULL) - free(pszWorkDir); - if(LocalHostName != NULL) - free(LocalHostName); + free(pszDfltNetstrmDrvr); + free(pszDfltNetstrmDrvrCAF); + free(pszDfltNetstrmDrvrKeyFile); + free(pszDfltNetstrmDrvrCertFile); + free(pszWorkDir); + free(LocalHostName); free(LocalHostNameOverride); - if(LocalFQDNName != NULL) - free(LocalFQDNName); + free(LocalFQDNName); objRelease(prop, CORE_COMPONENT); DESTROY_ATOMIC_HELPER_MUT(mutTerminateInputs); ENDObjClassExit(glbl) diff --git a/runtime/glbl.h b/runtime/glbl.h index 4b4bdf83..3c5e8501 100644 --- a/runtime/glbl.h +++ b/runtime/glbl.h @@ -8,25 +8,23 @@ * Please note that there currently is no glbl.c file as we do not yet * have any implementations. * - * Copyright 2008, 2009 Rainer Gerhards and Adiscon GmbH. + * Copyright 2008-2012 Rainer Gerhards and Adiscon GmbH. * * This file is part of the rsyslog runtime library. * - * The rsyslog runtime library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * The rsyslog runtime library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with the rsyslog runtime library. If not, see . - * - * A copy of the GPL can be found in the file "COPYING" in this distribution. - * A copy of the LGPL can be found in the file "COPYING.LESSER" in this distribution. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * -or- + * see COPYING.ASL20 in the source distribution + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef GLBL_H_INCLUDED @@ -77,6 +75,8 @@ BEGINinterface(glbl) /* name must also be changed in ENDinterface macro! */ SIMP_PROP(FdSetSize, int) /* v7: was neeeded to mean v5+v6 - do NOT add anything else for that version! */ /* next change is v8! */ + /* v8 - 2012-03-21 */ + prop_t* (*GetLocalHostIP)(void); #undef SIMP_PROP ENDinterface(glbl) #define glblCURR_IF_VERSION 7 /* increment whenever you change the interface structure! */ diff --git a/tools/syslogd.c b/tools/syslogd.c index 02a0dad6..9cd3c9ca 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -199,7 +199,6 @@ static rsRetVal GlobalClassExit(void); #endif static prop_t *pInternalInputName = NULL; /* there is only one global inputName for all internally-generated messages */ -static prop_t *pLocalHostIP = NULL; /* there is only one global IP for all internally-generated messages */ static uchar *ConfFile = (uchar*) _PATH_LOGCONF; /* read-only after startup */ static char *PidFile = _PATH_LOGPID; /* read-only after startup */ @@ -545,7 +544,8 @@ logmsgInternal(int iErr, int pri, uchar *msg, int flags) MsgSetRawMsgWOSize(pMsg, (char*)msg); MsgSetHOSTNAME(pMsg, glbl.GetLocalHostName(), ustrlen(glbl.GetLocalHostName())); MsgSetRcvFrom(pMsg, glbl.GetLocalHostNameProp()); - MsgSetRcvFromIP(pMsg, pLocalHostIP); +dbgprintf("ZZZZ: pLocalHostIPIF used!\n"); + MsgSetRcvFromIP(pMsg, glbl.GetLocalHostIP()); MsgSetMSGoffs(pMsg, 0); /* check if we have an error code associated and, if so, * adjust the tag. -- rgerhards, 2008-06-27 @@ -1109,8 +1109,6 @@ die(int sig) /* destruct our global properties */ if(pInternalInputName != NULL) prop.Destruct(&pInternalInputName); - if(pLocalHostIP != NULL) - prop.Destruct(&pLocalHostIP); /* terminate the remaining classes */ GlobalClassExit(); @@ -2660,10 +2658,6 @@ int realMain(int argc, char **argv) CHKiRet(prop.SetString(pInternalInputName, UCHAR_CONSTANT("rsyslogd"), sizeof("rsyslgod") - 1)); CHKiRet(prop.ConstructFinalize(pInternalInputName)); - CHKiRet(prop.Construct(&pLocalHostIP)); - CHKiRet(prop.SetString(pLocalHostIP, UCHAR_CONSTANT("127.0.0.1"), sizeof("127.0.0.1") - 1)); - CHKiRet(prop.ConstructFinalize(pLocalHostIP)); - /* get our host and domain names - we need to do this early as we may emit * error log messages, which need the correct hostname. -- rgerhards, 2008-04-04 */ @@ -2712,7 +2706,6 @@ int realMain(int argc, char **argv) CHKmalloc(LocalHostName = (uchar*)strdup(hent->h_aliases[i])); } else { CHKmalloc(LocalHostName = (uchar*)strdup(hent->h_name)); - int i; } if((p = (uchar*)strchr((char*)LocalHostName, '.'))) -- cgit From 1d6d534df2368c906a2d80663634b2eef5535ef7 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 22 Mar 2012 16:06:57 +0100 Subject: unified use of $LocalHostIPIF among all locally-emitting inputs with the exception of imdiag, which I humbly do not think needs this capabilit (even counter-productive for testbench use). --- plugins/imklog/imklog.c | 24 +----------------------- plugins/imuxsock/imuxsock.c | 27 +-------------------------- runtime/glbl.c | 2 +- 3 files changed, 3 insertions(+), 50 deletions(-) diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c index 66d7d143..b6fd7c79 100644 --- a/plugins/imklog/imklog.c +++ b/plugins/imklog/imklog.c @@ -74,7 +74,6 @@ int symbols_twice = 0; int use_syscall = 0; int symbol_lookup = 0; /* on recent kernels > 2.6, the kernel does this */ int bPermitNonKernel = 0; /* permit logging of messages not having LOG_KERN facility */ -static uchar *pLocalIPIF = NULL; int iFacilIntMsg; /* the facility to use for internal messages (set by driver) */ uchar *pszPath = NULL; int console_log_level = -1; @@ -237,22 +236,10 @@ ENDrunInput BEGINwillRun - uchar myIP[128]; - rsRetVal localRet; CODESTARTwillRun /* we need to create the inputName property (only once during our lifetime) */ CHKiRet(prop.CreateStringProp(&pInputName, UCHAR_CONSTANT("imklog"), sizeof("imklog") - 1)); - if(pLocalIPIF == NULL) { - strcpy((char*)myIP, "127.0.0.1"); - } else { - localRet = net.GetIFIPAddr(pLocalIPIF, AF_UNSPEC, myIP, (int) sizeof(myIP)); - if(localRet != RS_RET_OK) { - DBGPRINTF("imuxsock: could not obtain my IP, using 127.0.0.1 instead\n"); - strcpy((char*)myIP, "127.0.0.1"); - } - } - DBGPRINTF("imklog: using '%s' as localhost IP\n", myIP); - CHKiRet(prop.CreateStringProp(&pLocalHostIP, myIP, ustrlen(myIP))); + pLocalHostIP = glbl.GetLocalHostIP(); iRet = klogWillRun(); finalize_it: @@ -265,9 +252,6 @@ CODESTARTafterRun if(pInputName != NULL) prop.Destruct(&pInputName); - if(pLocalHostIP != NULL) - prop.Destruct(&pLocalHostIP); - free(pLocalIPIF); ENDafterRun @@ -300,10 +284,6 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a free(pszPath); pszPath = NULL; } - if(pLocalIPIF != NULL) { - free(pLocalIPIF); - pLocalIPIF = NULL; - } iFacilIntMsg = klogFacilIntMsg(); return RS_RET_OK; } @@ -327,8 +307,6 @@ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogpermitnonkernelfacility", 0, eCmdHdlrBinary, NULL, &bPermitNonKernel, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogconsoleloglevel", 0, eCmdHdlrInt, NULL, &console_log_level, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"kloginternalmsgfacility", 0, eCmdHdlrFacility, NULL, &iFacilIntMsg, STD_LOADABLE_MODULE_ID)); - CHKiRet(omsdRegCFSLineHdlr((uchar *)"kloglocalipif", 0, eCmdHdlrGetWord, - NULL, &pLocalIPIF, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID)); ENDmodInit /* vim:set ai: diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c index 0e91a977..ad290331 100644 --- a/plugins/imuxsock/imuxsock.c +++ b/plugins/imuxsock/imuxsock.c @@ -158,7 +158,6 @@ static int sd_fds = 0; /* number of systemd activated sockets */ /* config settings */ static int bOmitLocalLogging = 0; static uchar *pLogSockName = NULL; -static uchar *pLocalIPIF = NULL; static uchar *pLogHostName = NULL; /* host name to use with this socket */ static int bUseFlowCtl = 0; /* use flow control or not (if yes, only LIGHT is used! */ static int bIgnoreTimestamp = 1; /* ignore timestamps present in the incoming message? */ @@ -766,8 +765,6 @@ ENDrunInput BEGINwillRun - uchar myIP[128]; - rsRetVal localRet; CODESTARTwillRun register int i; int actSocks; @@ -830,22 +827,7 @@ CODESTARTwillRun CHKiRet(prop.SetString(pInputName, UCHAR_CONSTANT("imuxsock"), sizeof("imuxsock") - 1)); CHKiRet(prop.ConstructFinalize(pInputName)); - if(pLocalIPIF == NULL) { - strcpy((char*)myIP, "127.0.0.1"); - } else { - localRet = net.GetIFIPAddr((uchar*)pLocalIPIF, AF_UNSPEC, myIP, (int) sizeof(myIP)); - if(localRet != RS_RET_OK) { - DBGPRINTF("imuxsock: could not obtain my IP, using 127.0.0.1 instead\n"); - strcpy((char*)myIP, "127.0.0.1"); - } - } - - DBGPRINTF("imuxsock: using '%s' as localhost IP\n", myIP); - - CHKiRet(prop.Construct(&pLocalHostIP)); - CHKiRet(prop.SetString(pLocalHostIP, myIP, ustrlen(myIP))); - CHKiRet(prop.ConstructFinalize(pLocalHostIP)); - + pLocalHostIP = glbl.GetLocalHostIP(); finalize_it: ENDwillRun @@ -878,7 +860,6 @@ CODESTARTafterRun } /* free no longer needed string */ free(pLogSockName); - free(pLocalIPIF); free(pLogHostName); discardLogSockets(); @@ -923,10 +904,6 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a free(pLogSockName); pLogSockName = NULL; } - if(pLocalIPIF != NULL) { - free(pLocalIPIF); - pLocalIPIF = NULL; - } if(pLogHostName != NULL) { free(pLogHostName); pLogHostName = NULL; @@ -1011,8 +988,6 @@ CODEmodInit_QueryRegCFSLineHdlr NULL, &ratelimitSeverity, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID)); - CHKiRet(omsdRegCFSLineHdlr((uchar *)"imuxsocklocalipif", 0, eCmdHdlrGetWord, - NULL, &pLocalIPIF, STD_LOADABLE_MODULE_ID)); /* the following one is a (dirty) trick: the system log socket is not added via * an "addUnixListenSocket" config format. As such, it's properties can not be modified * via $InputUnixListenSocket*". So we need to add a special directive diff --git a/runtime/glbl.c b/runtime/glbl.c index 134e6c6e..4f2ee377 100644 --- a/runtime/glbl.c +++ b/runtime/glbl.c @@ -194,7 +194,7 @@ setLocalHostIPIF(void __attribute__((unused)) *pVal, uchar *pNewVal) localRet = net.GetIFIPAddr(pNewVal, AF_UNSPEC, myIP, (int) sizeof(myIP)); if(localRet != RS_RET_OK) { - errmsg.LogError(0, RS_RET_ERR, "$LocalIPIF: IP address for interface " + errmsg.LogError(0, RS_RET_ERR, "$LocalHostIPIF: IP address for interface " "'%s' cannnot be obtained - ignoring directive", pNewVal); } else { storeLocalHostIPIF(myIP); -- cgit From da2039614ffd93b8fb1ebddf2ed3eb6dc873c1a5 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 22 Mar 2012 18:13:11 +0100 Subject: cosmetic: pushing temp version up --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b38a1955..1200294b 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([rsyslog],[5.8.8-newstats10],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[5.8.8-newstats11],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -- cgit