Only require DNSBL replies to be in 127.0.0.0/8 instead of /24.

This commit is contained in:
Jilles Tjoelker 2008-11-15 16:17:16 +01:00
parent db3efb7ac2
commit b0c41d32b1

View file

@ -78,9 +78,9 @@ static void blacklist_dns_callback(void *vptr, struct DNSReply *reply)
if (reply != NULL)
{
/* only accept 127.0.0.x as a listing */
/* only accept 127.x.y.z as a listing */
if (reply->addr.ss_family == AF_INET &&
!memcmp(&((struct sockaddr_in *)&reply->addr)->sin_addr, "\177\0\0", 3))
!memcmp(&((struct sockaddr_in *)&reply->addr)->sin_addr, "\177", 1))
listed = TRUE;
else if (blcptr->blacklist->lastwarning + 3600 < rb_current_time())
{