[PATCH] [cfg] make dns_cache_hosts default to /etc/hosts
From: Balint Kovacs <balint.kovacs@balabit.com> The default for dns_cache_hosts was empty until now, which resulted in use_dns(persist_only) not to work out-of-the box until the user set the dns_cache_hosts to a sane value. This should make the configuration more intuitive in most use-cases. Signed-off-by: Balint Kovacs <blint@balabit.hu> --- lib/cfg.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/cfg.c b/lib/cfg.c index ed4cedf..8ba22df 100644 --- a/lib/cfg.c +++ b/lib/cfg.c @@ -315,6 +315,7 @@ cfg_new(gint version) self->dns_cache_size = 1007; self->dns_cache_expire = 3600; self->dns_cache_expire_failed = 60; + self->dns_cache_hosts = "/etc/hosts"; self->threaded = FALSE; log_template_options_defaults(&self->template_options); -- 1.7.0.4
On 08/24/2012 02:43 PM, balint.kovacs@balabit.com wrote:
From: Balint Kovacs <balint.kovacs@balabit.com>
The default for dns_cache_hosts was empty until now, which resulted in use_dns(persist_only) not to work out-of-the box until the user set the dns_cache_hosts to a sane value. This should make the configuration more intuitive in most use-cases.
Signed-off-by: Balint Kovacs <blint@balabit.hu> --- lib/cfg.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/cfg.c b/lib/cfg.c index ed4cedf..8ba22df 100644 --- a/lib/cfg.c +++ b/lib/cfg.c @@ -315,6 +315,7 @@ cfg_new(gint version) self->dns_cache_size = 1007; self->dns_cache_expire = 3600; self->dns_cache_expire_failed = 60; + self->dns_cache_hosts = "/etc/hosts"; self->threaded = FALSE;
log_template_options_defaults(&self->template_options);
Argh, and of course this would cause a segfault on syslog-ng shutdown when trying to free it, so the right thing would be self->dns_cache_hosts = g_strdup("/etc/hosts");
participants (2)
-
Balint Kovacs
-
balint.kovacs@balabit.com