diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-19 18:01:36 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-19 18:01:36 +0400 |
commit | f5bc6840a7db6034eeec338454105814fabbfb32 (patch) | |
tree | 642f268115839e63e16433432456f1c5cf48031b /src/dns.c | |
parent | 6a721dd9d9c62015ee365a36a0f1a0b9be344b4c (diff) | |
download | rspamd-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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |