[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-inetutils] small syslogd and IPv6 conf issue
From: |
Palmer, Thomas |
Subject: |
Re: [bug-inetutils] small syslogd and IPv6 conf issue |
Date: |
Mon, 15 Oct 2012 14:16:10 +0000 |
Alfred,
Thank you for your response. My entire *nix experience has been Linux
and I had not run into this before.
My first thought was that I could recraft this using strtok/spaces and
remove items starting with hash, but then I realized that wouldn't work either
as some files have spaces in their name. I agree with you that quotes would be
a necessary first move. I'll continue to use my patch for my own purposes then.
Thomas
-----Original Message-----
From: Alfred M. Szmidt [mailto:address@hidden
Sent: Saturday, October 13, 2012 7:33 AM
To: Palmer, Thomas
Cc: address@hidden
Subject: Re: [bug-inetutils] small syslogd and IPv6 conf issue
I'm using inetutils/syslogd 1.9.1 with eglibc 2.15. It appears
that getaddrinfo with IPv6 is sensitive to trailing spaces and
comments, where-as IPv4 addresses are not.
For example, syslogd/getaddrinfo handles this fine:
local0.* @1.2.3.4 #COMMENT
But it cannot parse this line successfully:
Local0.* @FE80::215:5DFF:FE73:2F00 #COMMENT
The fact that IPv4 works above may be an unintended consequence of
getaddrinfo behavior, but I have found that it has been beneficial
in my application development. The patch below will allow IPv6 to
behave the same way and should allow any config line to include a
comment at the end.
Hi Thomas, thank you for your bug report!
Strictly speak (i.e. evoking UNIX tradition), comments in syslog.conf are only
valid at the beginning of the line. So neither of those lines are ok. The
reason for that is that the hash sign is a valid file name, i.e. it is
completely valid to write use the following:
local0.* /var/log/#messages#
and expect the file /var/log/#messages# to exist with log data. So with this
patch, the above is not valid any more, and to make it valid one would need to
add quoting rules.
Thus, sadly, I am not sure if we should apply this as is.