From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: Neon and reverse address lookup Date: Sat, 18 Jan 2014 16:55:50 -0500 Message-ID: <87ob39osyh.fsf@netris.org> References: <20140118124847.GA6166@debian> <8738klou1c.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4duU-0001Z4-DQ for guix-devel@gnu.org; Sat, 18 Jan 2014 16:58:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W4duO-000721-Jx for guix-devel@gnu.org; Sat, 18 Jan 2014 16:58:34 -0500 In-Reply-To: <8738klou1c.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 18 Jan 2014 22:32:31 +0100") 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 =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) writes: > So /etc/hosts is not enough for reverse lookups to work. > > With nscd turned off, I tried this: > > guile -c '(pk (gethostbyaddr (inet-pton AF_INET "127.0.0.1")))' > > If nsswitch.conf is removed, then that resolves to =E2=80=9Clocalhost=E2= =80=9D (instead > of the actual host name.) As John said, it should resolve to "localhost". It certainly should _not_ resolve to the actual host name. > If, in addition, resolv.conf is removed, then that fails as seen above. > > With nsswitch.conf alone, it resolves correctly (Mark was right.) > And this works with only =E2=80=9Chosts: files=E2=80=9D in nsswitch.conf. When you say "it resolves correctly", which name does it resolve to? > It=E2=80=99s surprising that there=E2=80=99s this discrepancy between how= NSS works for > getaddrinfo and for gethostbyaddr. At any rate, we may be able to solve > this at the libc level. Solve what? What are you thinking of changing in libc? Mark