comparison src/dnsbl.cpp @ 272:a99b6c1f5f67

Code cleanup, increase minimum hostname length for uribl checking
author Carl Byington <carl@five-ten-sg.com>
date Mon, 09 Sep 2013 19:30:21 -0700
parents f92f24950bd3
children 368572c57013
comparison
equal deleted inserted replaced
271:93d1337fd5bc 272:a99b6c1f5f67
395 // as a string registered in hosts. 395 // as a string registered in hosts.
396 // otherwise, return false and preserve the value of found. 396 // otherwise, return false and preserve the value of found.
397 // 397 //
398 bool uriblookup(mlfiPriv &priv, string_set &hosts, const char *hostname, const char *&found) ; 398 bool uriblookup(mlfiPriv &priv, string_set &hosts, const char *hostname, const char *&found) ;
399 bool uriblookup(mlfiPriv &priv, string_set &hosts, const char *hostname, const char *&found) { 399 bool uriblookup(mlfiPriv &priv, string_set &hosts, const char *hostname, const char *&found) {
400 if (debug_syslog > 4) {
401 char tmp[maxlen];
402 snprintf(tmp, sizeof(tmp), "looking for %s on %s", hostname, priv.uribl_suffix);
403 my_syslog(tmp);
404 }
405 char buf[maxlen]; 400 char buf[maxlen];
406 snprintf(buf, sizeof(buf), "%s.%s.", hostname, priv.uribl_suffix); 401 snprintf(buf, sizeof(buf), "%s.%s.", hostname, priv.uribl_suffix);
407 uint32_t ip = ntohl(dns_interface(priv, buf, false, NULL)); 402 uint32_t ip = ntohl(dns_interface(priv, buf, false, NULL));
408 if (ip and (ip != 0x7f000000)) { 403 if (ip and (ip != 0x7f000000)) {
409 if (debug_syslog > 2) { 404 if (debug_syslog > 2) {