From b0c41d32b196d8436eb0a72c967fb116c303d4b8 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sat, 15 Nov 2008 16:17:16 +0100 Subject: [PATCH] Only require DNSBL replies to be in 127.0.0.0/8 instead of /24. --- src/blacklist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()) {