]> source.dussan.org Git - rspamd.git/commitdiff
Add workaround for surbl DNS flood.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 21 Jul 2015 14:03:31 +0000 (15:03 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 21 Jul 2015 14:03:31 +0000 (15:03 +0100)
src/plugins/surbl.c

index 66cc2da2bd0b59c9c47b94a0da9b0c17d82d6ed4..10fa225caba398241f4e3e20d6e9136869a7bd21 100644 (file)
@@ -827,6 +827,10 @@ make_surbl_requests (struct rspamd_url *url, struct rspamd_task *task,
        f.begin = url->host;
        f.len = url->hostlen;
 
+       if (task->dns_requests >= task->cfg->dns_max_requests) {
+               return;
+       }
+
        if ((surbl_req = format_surbl_request (task->task_pool, &f, suffix, TRUE,
                &err, forced, tree, url)) != NULL) {
                param =