diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-04-20 20:02:28 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-04-20 20:02:28 +0400 |
commit | 4d4668a0d4022583208d20bac9b8a0bede6f073d (patch) | |
tree | 14fbacb9511c738b40919aecbf168151605d28cb /src/symbols_cache.c | |
parent | 6cc47586dbcbf21fb67be92f6736fd76ca8baffb (diff) | |
download | rspamd-4d4668a0d4022583208d20bac9b8a0bede6f073d.tar.gz rspamd-4d4668a0d4022583208d20bac9b8a0bede6f073d.zip |
* Fix spf plugin that was broken in 0.4.7
* Add partial ipv6 support for some rspamd modules.
Diffstat (limited to 'src/symbols_cache.c')
-rw-r--r-- | src/symbols_cache.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/symbols_cache.c b/src/symbols_cache.c index 49934b6d2..ed8fa73f6 100644 --- a/src/symbols_cache.c +++ b/src/symbols_cache.c @@ -634,9 +634,12 @@ init_symbols_cache (memory_pool_t * pool, struct symbols_cache *cache, struct co static GList * check_dynamic_item (struct worker_task *task, struct symbols_cache *cache) { +#ifdef HAVE_INET_PTON + /* TODO: radix doesn't support ipv6 addrs */ + return NULL; +#else GList *res = NULL; uintptr_t r; - if (cache->dynamic_map != NULL && task->from_addr.s_addr != INADDR_NONE) { if ((r = radix32tree_find (cache->dynamic_map, ntohl (task->from_addr.s_addr))) != RADIX_NO_VALUE) { res = (GList *)((gpointer)r); @@ -646,13 +649,18 @@ check_dynamic_item (struct worker_task *task, struct symbols_cache *cache) return NULL; } } - return res; +#endif } static gboolean check_negative_dynamic_item (struct worker_task *task, struct symbols_cache *cache, struct cache_item *item) { + +#ifdef HAVE_INET_PTON + /* TODO: radix doesn't support ipv6 addrs */ + return FALSE; +#else GList *res = NULL; uintptr_t r; @@ -667,8 +675,9 @@ check_negative_dynamic_item (struct worker_task *task, struct symbols_cache *cac } } } - return FALSE; +#endif + } static gboolean |