From: Jilles Tjoelker Date: Sat, 15 Nov 2008 15:17:16 +0000 (+0100) Subject: Only require DNSBL replies to be in 127.0.0.0/8 instead of /24. X-Git-Url: https://jfr.im/git/solanum.git/commitdiff_plain/b0c41d32b196d8436eb0a72c967fb116c303d4b8 Only require DNSBL replies to be in 127.0.0.0/8 instead of /24. --- diff --git a/src/blacklist.c b/src/blacklist.c index 09e53d7e..fc355a88 100644 --- a/src/blacklist.c +++ b/src/blacklist.c @@ -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()) {