Inetutils/Syslogd group ~
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.
Index: inetutils/src/syslogd.c
===================================================================
--- inetutils/src/syslogd.c (revision 191)
+++ inetutils/src/syslogd.c (working copy)
@@ -1839,6 +1839,10 @@
strcpy (cline, p);
+ /* Remove end of line comments */
+ p = strchr (cline, '#');
+ if (p) *p = 0;
+
/* Cut the trailing spaces. */
for (p = strchr (cline, '\0'); isspace (*--p);)
;
Thomas