gchar *pid_file; /**< name of pid file */
gchar *temp_dir; /**< dir for temp files */
gchar *control_socket_path; /**< path to the control socket */
- gchar *local_addrs; /**< tree of local addresses */
+ const ucl_object_t *local_addrs; /**< tree of local addresses */
#ifdef WITH_GPERF_TOOLS
gchar *profile_path;
#endif
"Limit of files count in `cores_dir`");
rspamd_rcl_add_default_handler (sub,
"local_addrs",
- rspamd_rcl_parse_struct_string,
+ rspamd_rcl_parse_struct_ucl,
G_STRUCT_OFFSET (struct rspamd_config, local_addrs),
0,
"Use the specified addresses as local ones");
if (ctx != NULL) {
if (cfg->local_addrs) {
- if (!rspamd_map_is_map (cfg->local_addrs)) {
- radix_add_generic_iplist (cfg->local_addrs,
+ if (ucl_object_type (cfg->local_addrs) == UCL_STRING &&
+ !rspamd_map_is_map (ucl_object_tostring (cfg->local_addrs))) {
+ radix_add_generic_iplist (ucl_object_tostring (cfg->local_addrs),
(radix_compressed_t **)ctx->local_addrs);
}
else {
- rspamd_map_add (cfg, cfg->local_addrs,
+ rspamd_map_add_from_ucl (cfg, cfg->local_addrs,
"Local addresses", rspamd_radix_read, rspamd_radix_fin,
(void **) ctx->local_addrs);
}