summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-08-20 14:22:33 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-08-20 14:22:33 +0200
commitdaa76ad94428599336ddafdd6854dc0b71356180 (patch)
treecf7ecee365ee9d0b180e629b465fc57f38df72f6
parent9bb9181572d445dd300546113fc617eb549866ba (diff)
downloadrsyslog-daa76ad94428599336ddafdd6854dc0b71356180.tar.gz
rsyslog-daa76ad94428599336ddafdd6854dc0b71356180.tar.xz
rsyslog-daa76ad94428599336ddafdd6854dc0b71356180.zip
bugfix: hostnames with dashes in them were incorrectly treated as malformed
... thus causing them to be treated as TAG (this was a regression introduced from the "rfc3164 strict" change in 4.5.0).
-rw-r--r--ChangeLog3
-rw-r--r--tools/syslogd.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d1ba8617..0ab127bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,9 @@ Version 4.5.2 [DEVEL] (rgerhards), 2009-07-??
are now unsigned (as they always should have been) and so the dangling
mis-indexing does no longer happen. This bug potentially affected all
installations, even if only some may actually have seen a segfault.
+- bugfix: hostnames with dashes in them were incorrectly treated as
+ malformed, thus causing them to be treated as TAG (this was a regression
+ introduced from the "rfc3164 strict" change in 4.5.0).
---------------------------------------------------------------------------
Version 4.5.1 [DEVEL] (rgerhards), 2009-07-15
- CONFIG CHANGE: $HUPisRestart default is now "off". We are doing this
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 3846e6a9..88588621 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -1218,7 +1218,7 @@ int parseLegacySyslogMsg(msg_t *pMsg, int flags)
if(flags & PARSE_HOSTNAME) {
i = 0;
while((isalnum(p2parse[i]) || p2parse[i] == '.' || p2parse[i] == '.'
- || p2parse[i] == '_') && i < CONF_TAG_MAXSIZE) {
+ || p2parse[i] == '_' || p2parse[i] == '-') && i < CONF_TAG_MAXSIZE) {
bufParseHOSTNAME[i] = p2parse[i];
++i;
}