Mercurial > dnsbl
diff src/dnsbl.cpp @ 120:1d9e6c1b8872
uribl patch from Jeff Evans <jeffe@tricab.com>
author | carl |
---|---|
date | Sun, 12 Mar 2006 12:55:40 -0800 |
parents | d9d2f8699621 |
children | ecd97e7eb1f0 |
line wrap: on
line diff
--- a/src/dnsbl.cpp Sun Mar 12 12:38:43 2006 -0800 +++ b/src/dnsbl.cpp Sun Mar 12 12:55:40 2006 -0800 @@ -698,9 +698,9 @@ bool check_uribl(mlfiPriv &priv, char *hostname) { in_addr ip; if (inet_aton(hostname, &ip)) { + const u_char *src = (const u_char *)&ip.s_addr; char adr[sizeof "255.255.255.255"]; - adr[0] = '\0'; - inet_ntop(AF_INET, (const u_char *)&ip, adr, sizeof(adr)); + snprintf(adr, sizeof(adr), "%u.%u.%u.%u", src[3], src[2], src[1], src[0]); return (uriblookup(priv, adr, NULL)); }