diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-04-15 10:06:33 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-04-15 10:06:33 +0200 |
commit | 526e7d0d3fd12c255a51e2ac74df8fbf56abc31b (patch) | |
tree | 13893e11938b06aab7387b6d90b1e92aa855c44e | |
parent | f31e2b3b66b6ed21c96cfe3526c9c8b4aee309ed (diff) | |
parent | e7deab65dcad38a613c749e44e36c6c795000867 (diff) | |
download | rsyslog-526e7d0d3fd12c255a51e2ac74df8fbf56abc31b.tar.gz rsyslog-526e7d0d3fd12c255a51e2ac74df8fbf56abc31b.tar.xz rsyslog-526e7d0d3fd12c255a51e2ac74df8fbf56abc31b.zip |
Merge branch 'v4-stable' into v5-stable
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | doc/omrelp.html | 1 | ||||
-rw-r--r-- | plugins/omrelp/omrelp.c | 14 |
3 files changed, 16 insertions, 2 deletions
@@ -792,6 +792,9 @@ Version 4.7.0 [v4-devel] (rgerhards), 2010-04-14 - imported changes from 4.5.6 and below --------------------------------------------------------------------------- Version 4.6.6 [v4-stable] (rgerhards), 2010-11-?? +- bugfix: IPv6-address could not be specified in omrelp + this was due to improper parsing of ":" + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=250 - bugfix: imfile potentially duplicates lines This can happen when 0 bytes are read from the input file, and some writer appends data to the file BEFORE we check if a rollover happens. diff --git a/doc/omrelp.html b/doc/omrelp.html index b3132d78..22e6845f 100644 --- a/doc/omrelp.html +++ b/doc/omrelp.html @@ -44,6 +44,7 @@ special "RSYSLOG_ForwardFormat" (case sensitive!) template is used.<br> # port 2514 *.* :omrelp:centralserv:2514;RSYSLOG_ForwardFormat </textarea> +Note: to use IPv6 addresses, encode them in [::1] format. <p>[<a href="rsyslog_conf.html">rsyslog.conf overview</a>] [<a href="manual.html">manual index</a>] [<a href="http://www.rsyslog.com/">rsyslog site</a>]</p> <p><font size="2">This documentation is part of the diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c index cf70381f..1453d68f 100644 --- a/plugins/omrelp/omrelp.c +++ b/plugins/omrelp/omrelp.c @@ -251,8 +251,18 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1) /* extract the host first (we do a trick - we replace the ';' or ':' with a '\0') * now skip to port and then template name. rgerhards 2005-07-06 */ - for(q = p ; *p && *p != ';' && *p != ':' ; ++p) - /* JUST SKIP */; + if(*p == '[') { /* everything is hostname upto ']' */ + ++p; /* skip '[' */ + for(q = p ; *p && *p != ']' ; ++p) + /* JUST SKIP */; + if(*p == ']') { + *p = '\0'; /* trick to obtain hostname (later)! */ + ++p; /* eat it */ + } + } else { /* traditional view of hostname */ + for(q = p ; *p && *p != ';' && *p != ':' && *p != '#' ; ++p) + /* JUST SKIP */; + } pData->port = NULL; if(*p == ':') { /* process port */ |