summaryrefslogtreecommitdiffstats
path: root/src/plugins/fuzzy_check.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-21 15:29:05 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-21 15:29:05 +0100
commit53e8a8b05b7f0696ce72ccfd347a35bb80f19570 (patch)
tree4f8159b9de816f4e4f6788d23e0211dd08fdb478 /src/plugins/fuzzy_check.c
parentb8f84a8d97210e9a2df04ad4687624a30d62a1a4 (diff)
downloadrspamd-53e8a8b05b7f0696ce72ccfd347a35bb80f19570.tar.gz
rspamd-53e8a8b05b7f0696ce72ccfd347a35bb80f19570.zip
Finish conversion to new inet addr structure.
Diffstat (limited to 'src/plugins/fuzzy_check.c')
-rw-r--r--src/plugins/fuzzy_check.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index 195ee19da..a6c1ed0f2 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -821,24 +821,14 @@ fuzzy_symbol_callback (struct rspamd_task *task, void *unused)
GList *cur;
/* Check whitelist */
-#ifdef HAVE_INET_PTON
if (fuzzy_module_ctx->whitelist && task->from_addr.af == AF_INET) {
if (radix32tree_find (fuzzy_module_ctx->whitelist,
ntohl (task->from_addr.addr.s4.sin_addr.s_addr)) != RADIX_NO_VALUE) {
msg_info ("<%s>, address %s is whitelisted, skip fuzzy check",
- task->message_id, inet_ntoa (task->from_addr.d.in4));
+ task->message_id, rspamd_inet_address_to_string (&task->from_addr));
return;
}
}
-#else
- if (fuzzy_module_ctx->whitelist && task->from_addr.s_addr != 0) {
- if (radix32tree_find (fuzzy_module_ctx->whitelist, ntohl ((guint32) task->from_addr.s_addr)) != RADIX_NO_VALUE) {
- msg_info ("<%s>, address %s is whitelisted, skip fuzzy check",
- task->message_id, inet_ntoa (task->from_addr));
- return;
- }
- }
-#endif
cur = fuzzy_module_ctx->fuzzy_rules;
while (cur) {