|
From: | Palmer, Thomas |
Subject: | [bug-inetutils] small syslogd and IPv6 conf issue |
Date: | Fri, 12 Oct 2012 20:22:09 +0000 |
Inetutils/Syslogd group ~
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 |
[Prev in Thread] | Current Thread | [Next in Thread] |