From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: Re: Neon and reverse address lookup Date: Sat, 18 Jan 2014 22:49:08 +0100 Message-ID: <20140118214908.GA31816@jocasta.intra> References: <20140118124847.GA6166@debian> <8738klou1c.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5mCyUwZo2JvN/JJP" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4dlg-0005c7-Bu for guix-devel@gnu.org; Sat, 18 Jan 2014 16:49:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W4dlb-0003ma-Tl for guix-devel@gnu.org; Sat, 18 Jan 2014 16:49:28 -0500 Content-Disposition: inline In-Reply-To: <8738klou1c.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic Court??s Cc: guix-devel@gnu.org --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm not sure if I'm reading your message as you intended, but for the record, 127.0.0.1 should ALWAYS resolve to "localhost" - without the domain name, and NOT to the canonical hostname. If it does not, then a lot of things break. J' On Sat, Jan 18, 2014 at 10:32:31PM +0100, Ludovic Court??s wrote: =20 So /etc/hosts is not enough for reverse lookups to work. =20 With nscd turned off, I tried this: =20 guile -c '(pk (gethostbyaddr (inet-pton AF_INET "127.0.0.1")))' =20 If nsswitch.conf is removed, then that resolves to ???localhost??? (in= stead of the actual host name.) =20 If, in addition, resolv.conf is removed, then that fails as seen above. =20 With nsswitch.conf alone, it resolves correctly (Mark was right.) And this works with only ???hosts: files??? in nsswitch.conf. =20 It???s surprising that there???s this discrepancy between how NSS work= s for getaddrinfo and for gethostbyaddr. At any rate, we may be able to sol= ve this at the libc level. =20 Thanks, Ludo???. =20 --=20 PGP Public key ID: 1024D/2DE827B3=20 fingerprint =3D 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key. --5mCyUwZo2JvN/JJP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlLa9tQACgkQimdxnC3oJ7N7GQCfZ6dAayx4H0GNbCc53HQSsiJo VcMAoIRaHpL81ADaI9VlMAS8ftw5DtIh =1Bd3 -----END PGP SIGNATURE----- --5mCyUwZo2JvN/JJP--