diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-08-07 10:28:40 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-08-07 10:28:40 +0200 |
commit | 66300192944fe2c4390e53549ed51b4b25e79524 (patch) | |
tree | bf63e3c3f11340a8bcf5ad82f1ba7b44156a5a1e | |
parent | b829284f37add946ac810b125e3bededa1206c96 (diff) | |
parent | b761fbb0f0c9d5cf253ad3f58f7d8486b5650e85 (diff) | |
download | rsyslog-66300192944fe2c4390e53549ed51b4b25e79524.tar.gz rsyslog-66300192944fe2c4390e53549ed51b4b25e79524.tar.xz rsyslog-66300192944fe2c4390e53549ed51b4b25e79524.zip |
Merge branch 'v3-stable' into beta
Conflicts:
omfwd.c
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | doc/rsyslog_conf.html | 9 | ||||
-rw-r--r-- | tools/omfwd.c | 14 |
3 files changed, 27 insertions, 2 deletions
@@ -158,6 +158,7 @@ Version 3.19.0 (rgerhards), 2008-05-06 - -c option no longer must be the first option - thanks to varmjofekoj for the patch Version 3.18.2 (rgerhards), 2008-07-?? +- merged in IPv6 forwarding address bugfix from v2-stable --------------------------------------------------------------------------- Version 3.18.1 (rgerhards), 2008-07-21 - bugfix: potential segfault in creating message mutex in non-direct queue @@ -759,6 +760,11 @@ Version 3.10.0 (rgerhards), 2008-01-07 - much cleaner code due to new objects and removal of single-threading mode --------------------------------------------------------------------------- +Version 2.0.6 V2-STABLE (rgerhards), 2008-08-07 +- bugfix: IPv6 addresses could not be specified in forwarding actions + New syntax @[addr]:port introduced to enable that. Root problem was IPv6 + addresses contain colons. (backport from 3.21.3) +--------------------------------------------------------------------------- Version 2.0.5 STABLE (rgerhards), 2008-05-15 - bugfix: regular expressions inside property replacer did not work properly diff --git a/doc/rsyslog_conf.html b/doc/rsyslog_conf.html index d78f616b..72048c5c 100644 --- a/doc/rsyslog_conf.html +++ b/doc/rsyslog_conf.html @@ -870,6 +870,15 @@ port 1470.</p> <p>In the example above, messages are forwarded via UDP to the machine 192.168.0.1, the destination port defaults to 514. Messages will not be compressed.</p> +<p>Note that IPv6 addresses contain colons. So if an IPv6 address is specified +in the hostname part, rsyslogd could not detect where the IP address ends +and where the port starts. There is a syntax extension to support this: +put squary brackets around the address (e.g. "[2001::1]"). Square +brackets also work with real host names and IPv4 addresses, too. +<p>A valid sample to send messages to the IPv6 host 2001::1 at port 515 +is as follows: +<p>*.* @[2001::1]:515 +<p>This works with TCP, too. <p><b>Note to sysklogd users:</b> sysklogd does <b>not</b> support RFC 3164 format, which is the default forwarding template in rsyslog. As such, you will experience duplicate hostnames if rsyslog is diff --git a/tools/omfwd.c b/tools/omfwd.c index 30761a87..1b617ee1 100644 --- a/tools/omfwd.c +++ b/tools/omfwd.c @@ -558,8 +558,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 != '#' ; ++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 */ |