diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-25 13:40:00 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-25 13:40:00 +0100 |
commit | 9919068fcd7e999502ec62cc1fd2b794e5ced55b (patch) | |
tree | 4dc488bf5d33a94632e958753ed1da7f97b8b809 /src/plugins/dkim_check.c | |
parent | f0448d158b9858294a5cd54d3b2fab15193f1485 (diff) | |
download | rspamd-9919068fcd7e999502ec62cc1fd2b794e5ced55b.tar.gz rspamd-9919068fcd7e999502ec62cc1fd2b794e5ced55b.zip |
[Feature] Use new ip parsing API
Diffstat (limited to 'src/plugins/dkim_check.c')
-rw-r--r-- | src/plugins/dkim_check.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c index 3ea31485f..a7e09aa53 100644 --- a/src/plugins/dkim_check.c +++ b/src/plugins/dkim_check.c @@ -220,7 +220,6 @@ gint dkim_module_config (struct rspamd_config *cfg) { const ucl_object_t *value; - const gchar *str; gint res = TRUE, cb_id; guint cache_size; gboolean got_trusted = FALSE; @@ -272,17 +271,8 @@ dkim_module_config (struct rspamd_config *cfg) if ((value = rspamd_config_get_module_opt (cfg, "dkim", "whitelist")) != NULL) { - str = ucl_obj_tostring (value); - if (str && !rspamd_map_is_map (str)) { - radix_add_generic_iplist (str, - &dkim_module_ctx->whitelist_ip); - } - else { - rspamd_map_add_from_ucl (cfg, value, - "DKIM whitelist", rspamd_radix_read, rspamd_radix_fin, - (void **)&dkim_module_ctx->whitelist_ip); - - } + rspamd_config_radix_from_ucl (cfg, value, "DKIM whitelist", + &dkim_module_ctx->whitelist_ip, NULL); } if ((value = rspamd_config_get_module_opt (cfg, "dkim", "domains")) != NULL) { |