summaryrefslogtreecommitdiffstats
path: root/src/plugins/spf.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-25 13:40:00 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-25 13:40:00 +0100
commit9919068fcd7e999502ec62cc1fd2b794e5ced55b (patch)
tree4dc488bf5d33a94632e958753ed1da7f97b8b809 /src/plugins/spf.c
parentf0448d158b9858294a5cd54d3b2fab15193f1485 (diff)
downloadrspamd-9919068fcd7e999502ec62cc1fd2b794e5ced55b.tar.gz
rspamd-9919068fcd7e999502ec62cc1fd2b794e5ced55b.zip
[Feature] Use new ip parsing API
Diffstat (limited to 'src/plugins/spf.c')
-rw-r--r--src/plugins/spf.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/plugins/spf.c b/src/plugins/spf.c
index 67c8732e7..ec7540895 100644
--- a/src/plugins/spf.c
+++ b/src/plugins/spf.c
@@ -164,7 +164,6 @@ spf_module_config (struct rspamd_config *cfg)
const ucl_object_t *value;
gint res = TRUE, cb_id;
guint cache_size;
- const gchar *str;
if (!rspamd_config_is_module_enabled (cfg, "spf")) {
return TRUE;
@@ -211,18 +210,8 @@ spf_module_config (struct rspamd_config *cfg)
if ((value =
rspamd_config_get_module_opt (cfg, "spf", "whitelist")) != NULL) {
- str = ucl_obj_tostring (value);
-
- if (str && !rspamd_map_is_map (str)) {
- radix_add_generic_iplist (str,
- &spf_module_ctx->whitelist_ip);
- }
- else {
- rspamd_map_add_from_ucl (cfg, value,
- "SPF whitelist", rspamd_radix_read, rspamd_radix_fin,
- (void **)&spf_module_ctx->whitelist_ip);
-
- }
+ rspamd_config_radix_from_ucl (cfg, value, "SPF whitelist",
+ &spf_module_ctx->whitelist_ip, NULL);
}
cb_id = rspamd_symbols_cache_add_symbol (cfg->cache,