29 Jan
2008
29 Jan
'08
6:59 p.m.
We enabled dns caching with a configuration like dns_cache_hosts(/etc/hosts), and found that syslog-ng was re-reading the hosts file every time it needed to resolve a host name. This patch fixed it. diff -ru syslog-ng-2.0.6/src/dnscache.c syslog-ng-2.0.6-patch/src/dnscache.c --- syslog-ng-2.0.6/src/dnscache.c 2007-04-19 15:37:16.000000000 -0400 +++ syslog-ng-2.0.6-patch/src/dnscache.c 2008-01-26 19:45:31.000000000 -0500 @@ -168,7 +168,9 @@ if (hosts) { gchar buf[4096]; - + + dns_cache_hosts_mtime = st.st_mtime; + while (fgets(buf, sizeof(buf), hosts)) { gchar *p, *ip;