aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/radix.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-10-01 17:35:47 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-10-01 17:35:47 +0100
commit6f8fa405cf5d394491b987d824f5e1b74c14a4c8 (patch)
tree461a516b628265e9e4767f890f13766218535b41 /src/libutil/radix.c
parentebdf58dc0aed1014374dc56c0b28fe76f3b0c0b1 (diff)
downloadrspamd-6f8fa405cf5d394491b987d824f5e1b74c14a4c8.tar.gz
rspamd-6f8fa405cf5d394491b987d824f5e1b74c14a4c8.zip
Rework parsing of ip lists.
Diffstat (limited to 'src/libutil/radix.c')
-rw-r--r--src/libutil/radix.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libutil/radix.c b/src/libutil/radix.c
index c8aaaf946..c58125003 100644
--- a/src/libutil/radix.c
+++ b/src/libutil/radix.c
@@ -962,6 +962,16 @@ rspamd_radix_add_iplist (const gchar *list, const gchar *separators,
return res;
}
+gboolean
+radix_add_generic_iplist (const gchar *ip_list, radix_compressed_t **tree)
+{
+ if (*tree == NULL) {
+ *tree = radix_create_compressed ();
+ }
+
+ return (rspamd_radix_add_iplist (ip_list, ",; ", *tree) > 0);
+}
+
/*
* vi:ts=4
*/