Mercurial > dnsbl
comparison src/dnsbl.cpp @ 410:6b03435868cb stable-6-0-55
require 3 dots in bare ip addresses
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sun, 16 Apr 2017 09:12:08 -0700 |
parents | e018ed19a1cc |
children | d5a1ed33d3ae |
comparison
equal
deleted
inserted
replaced
409:e018ed19a1cc | 410:6b03435868cb |
---|---|
315 // milter thread is talking over its own socket to a separate resolver | 315 // milter thread is talking over its own socket to a separate resolver |
316 // process, which does the actual dns resolution. | 316 // process, which does the actual dns resolution. |
317 if (priv.err) return 0; // cannot ask more questions on this socket. | 317 if (priv.err) return 0; // cannot ask more questions on this socket. |
318 if (maybe_ip && (qtype == ns_t_a)) { | 318 if (maybe_ip && (qtype == ns_t_a)) { |
319 int c = 0; | 319 int c = 0; |
320 const char q = question; | 320 const char* q = question; |
321 while (*q) { | 321 while (*q) { |
322 if (*q == '.') c++; | 322 if (*q == '.') c++; |
323 q++; | 323 q++; |
324 } | 324 } |
325 // might be a bare IPv4 address, try this first to avoid dns lookups that may not be needed | 325 // might be a bare IPv4 address, try this first to avoid dns lookups that may not be needed |