[syslog-ng] Bug in 2.0.7's use_dns(persist_only) and large host files
Steve Bernacki
syslogng at f.copacetic.net
Sun Jan 27 20:25:57 CET 2008
Environment: CentOS 5 and Syslog-ng 2.0.7 (current snapshot)
Relevant syslog-ng.conf snippet:
===
options {
use_dns(persist_only);
dns_cache_hosts("/etc/hosts");
};
===
If you point syslog-ng to an /etc/hosts file that has more than 1007
entries, upon receiving its first message, syslog-ng will throw the
following assertion:
# ./syslog-ng -Fed
syslog-ng starting up; version='2.0.7'
Incoming log entry; line='<38>well hello'
file dnscache.c: line 99 (dns_cache_key_hash): should not be reached
Aborted
Workaround: In syslog-ng.conf, set dns_cache_size() to a value greater
than the number of entries in your /etc/hosts file.
Fix: See the attached patch; it should apply cleanly to any version of
2.0.7, and perhaps older versions as well.
Steve
--
Steve Bernacki, Jr
To date, the Pan-Massachusetts Challenge has raised 204 million
dollars for cancer research. Get involved! http://www.pmc.org/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: syslogpatch.txt
Url: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20080127/257d1869/attachment.txt
More information about the syslog-ng
mailing list