summaryrefslogtreecommitdiffstats
path: root/tools/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-06-06 11:55:23 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-06-06 11:55:23 +0200
commitf27cff39a3ec4c904e366ac3927e4975b158aafe (patch)
tree3e0f89c4feb0d70983e2bf875229be33ca574ecd /tools/syslogd.c
parent82688df6b52c9c1d42ca9919da13f25e2cdb9961 (diff)
parent127671fed1707e686e8d7b316b2641b663892fec (diff)
downloadrsyslog-f27cff39a3ec4c904e366ac3927e4975b158aafe.tar.gz
rsyslog-f27cff39a3ec4c904e366ac3927e4975b158aafe.tar.bz2
rsyslog-f27cff39a3ec4c904e366ac3927e4975b158aafe.zip
Merge branch 'nextmaster'
Conflicts: ChangeLog
Diffstat (limited to 'tools/syslogd.c')
-rw-r--r--tools/syslogd.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 7a8e21c2..2bc80e44 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -1056,7 +1056,7 @@ finalize_it:
* the time being (remember that we want to restructure config processing at large!).
* rgerhards, 2009-10-27
*/
-rsRetVal createMainQueue(qqueue_t **ppQueue, uchar *pszQueueName, struct cnfparamvals *queueParams)
+rsRetVal createMainQueue(qqueue_t **ppQueue, uchar *pszQueueName, struct nvlst *lst)
{
struct queuefilenames_s *qfn;
uchar *qfname = NULL;
@@ -1072,7 +1072,7 @@ rsRetVal createMainQueue(qqueue_t **ppQueue, uchar *pszQueueName, struct cnfpara
/* name our main queue object (it's not fatal if it fails...) */
obj.SetName((obj_t*) (*ppQueue), pszQueueName);
- if(queueParams == NULL) { /* use legacy parameters? */
+ if(lst == NULL) { /* use legacy parameters? */
/* ... set some properties ... */
# define setQPROP(func, directive, data) \
CHKiRet_Hdlr(func(*ppQueue, data)) { \
@@ -1129,7 +1129,7 @@ rsRetVal createMainQueue(qqueue_t **ppQueue, uchar *pszQueueName, struct cnfpara
# undef setQPROPstr
} else { /* use new style config! */
qqueueSetDefaultsRulesetQueue(*ppQueue);
- qqueueApplyCnfParam(*ppQueue, queueParams);
+ qqueueApplyCnfParam(*ppQueue, lst);
}
/* ... and finally start the queue! */
@@ -1772,7 +1772,7 @@ int realMain(int argc, char **argv)
* of other options, we do this during the inital option processing.
* rgerhards, 2008-04-04
*/
- while((ch = getopt(argc, argv, "46a:Ac:dDef:g:hi:l:m:M:nN:op:qQr::s:t:T:u:vwx")) != EOF) {
+ while((ch = getopt(argc, argv, "46a:Ac:dDef:g:hi:l:m:M:nN:op:qQr::s:S:t:T:u:vwx")) != EOF) {
switch((char)ch) {
case '4':
case '6':
@@ -1790,6 +1790,7 @@ int realMain(int argc, char **argv)
case 'q': /* add hostname if DNS resolving has failed */
case 'Q': /* dont resolve hostnames in ACL to IPs */
case 's':
+ case 'S': /* Source IP for local client to be used on multihomed host */
case 'T': /* chroot on startup (primarily for testing) */
case 'u': /* misc user settings */
case 'w': /* disable disallowed host warnings */
@@ -1881,6 +1882,13 @@ int realMain(int argc, char **argv)
case 'a':
fprintf(stderr, "rsyslogd: error -a is no longer supported, use module imuxsock instead");
break;
+ case 'S': /* Source IP for local client to be used on multihomed host */
+ if(glbl.GetSourceIPofLocalClient() != NULL) {
+ fprintf (stderr, "rsyslogd: Only one -S argument allowed, the first one is taken.\n");
+ } else {
+ glbl.SetSourceIPofLocalClient((uchar*)arg);
+ }
+ break;
case 'f': /* configuration file */
ConfFile = (uchar*) arg;
break;