aboutsummaryrefslogtreecommitdiffstats
path: root/src/dns.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-19 18:01:36 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-19 18:01:36 +0400
commitf5bc6840a7db6034eeec338454105814fabbfb32 (patch)
tree642f268115839e63e16433432456f1c5cf48031b /src/dns.c
parent6a721dd9d9c62015ee365a36a0f1a0b9be344b4c (diff)
downloadrspamd-f5bc6840a7db6034eeec338454105814fabbfb32.tar.gz
rspamd-f5bc6840a7db6034eeec338454105814fabbfb32.zip
* Do not try to resolve names with several dots in a row
* Fix surbl request formatting for ip addresses
Diffstat (limited to 'src/dns.c')
-rw-r--r--src/dns.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dns.c b/src/dns.c
index a0b9b36aa..7e4f56972 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -371,6 +371,12 @@ format_dns_name (struct rspamd_dns_request *req, const char *name, guint namelen
label_len = remain - 1;
msg_err ("no buffer remain for constructing query, strip to %ud", label_len);
}
+ if (label_len == 0) {
+ /* Two dots in order, skip this */
+ msg_info ("name contains two or more dots in a row, replace it with one dot");
+ begin = dot + 1;
+ continue;
+ }
/* First try to compress name */
if (! try_compress_label (req->pool, pos, req->packet, end - begin, begin, table)) {
*pos++ = (guint8)label_len;