From f9482b795a2951c3464e47bee10da0ac0edaab9c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 15 Mar 2016 14:57:38 +0000 Subject: [PATCH] [Minor] Nameservers are now raw ucl object --- src/libserver/cfg_file.h | 2 +- src/libserver/cfg_rcl.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index 8a59f8c74..a4e7d966c 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -360,7 +360,7 @@ struct rspamd_config { guint32 dns_throttling_errors; /**< maximum errors for starting resolver throttling */ guint32 dns_throttling_time; /**< time in seconds for DNS throttling */ guint32 dns_io_per_server; /**< number of sockets per DNS server */ - GList *nameservers; /**< list of nameservers or NULL to parse resolv.conf */ + const ucl_object_t *nameservers; /**< list of nameservers or NULL to parse resolv.conf */ guint32 dns_max_requests; /**< limit of DNS requests per task */ guint upstream_max_errors; /**< upstream max errors before shutting off */ diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c index e33bff155..6bbbcfd35 100644 --- a/src/libserver/cfg_rcl.c +++ b/src/libserver/cfg_rcl.c @@ -1607,7 +1607,7 @@ rspamd_rcl_config_init (struct rspamd_config *cfg) /* Old DNS configuration */ rspamd_rcl_add_default_handler (sub, "dns_nameserver", - rspamd_rcl_parse_struct_string_list, + rspamd_rcl_parse_struct_ucl, G_STRUCT_OFFSET (struct rspamd_config, nameservers), 0, "Legacy option for DNS servers used"); @@ -1846,13 +1846,13 @@ rspamd_rcl_config_init (struct rspamd_config *cfg) "Options for DNS resolver"); rspamd_rcl_add_default_handler (ssub, "nameserver", - rspamd_rcl_parse_struct_string_list, + rspamd_rcl_parse_struct_ucl, G_STRUCT_OFFSET (struct rspamd_config, nameservers), 0, "List of DNS servers"); rspamd_rcl_add_default_handler (ssub, "server", - rspamd_rcl_parse_struct_string_list, + rspamd_rcl_parse_struct_ucl, G_STRUCT_OFFSET (struct rspamd_config, nameservers), 0, "List of DNS servers"); -- 2.39.5