From b342fc607a01b76625b7fcd64746cd0a673b11fe Mon Sep 17 00:00:00 2001 From: jdc Date: Sun, 8 Jan 2006 17:20:28 +0000 Subject: [PATCH] Use ntohl(host_address) so that RBL lookups work on little-endian hosts. Tested on alpha, i386 and sparc64. Fixes PR lib/30402. --- lib/libwrap/hosts_access.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libwrap/hosts_access.c b/lib/libwrap/hosts_access.c index 51063e4d118e..57242f8c4e65 100644 --- a/lib/libwrap/hosts_access.c +++ b/lib/libwrap/hosts_access.c @@ -1,4 +1,4 @@ -/* $NetBSD: hosts_access.c,v 1.17 2002/12/26 12:53:59 lukem Exp $ */ +/* $NetBSD: hosts_access.c,v 1.18 2006/01/08 17:20:28 jdc Exp $ */ /* * This module implements a simple access control language that is based on @@ -24,7 +24,7 @@ #if 0 static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22"; #else -__RCSID("$NetBSD: hosts_access.c,v 1.17 2002/12/26 12:53:59 lukem Exp $"); +__RCSID("$NetBSD: hosts_access.c,v 1.18 2006/01/08 17:20:28 jdc Exp $"); #endif #endif @@ -321,6 +321,7 @@ char *rbl_hostaddr; /* hostaddr */ tcpd_warn("unable to convert %s to address", rbl_hostaddr); return (NO); } + host_address = ntohl(host_address); /* construct the rbl name to look up */ if ((rbl_name = malloc(len)) == NULL) { tcpd_jump("not enough memory to build RBL name for %s in %s", rbl_hostaddr, rbl_domain);