From owner-cvs-all Mon Jul 23 17: 5:21 2001 Delivered-To: cvs-all@freebsd.org Received: from Awfulhak.org (gw.Awfulhak.org [217.204.245.18]) by hub.freebsd.org (Postfix) with ESMTP id 4E6CC37B406; Mon, 23 Jul 2001 17:05:10 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.4/8.11.4) with ESMTP id f6O058g01523; Tue, 24 Jul 2001 01:05:08 +0100 (BST) (envelope-from brian@lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.4/8.11.4) with ESMTP id f6O057g73473; Tue, 24 Jul 2001 01:05:07 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200107240005.f6O057g73473@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Hajimu UMEMOTO Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, brian@Awfulhak.org Subject: Re: cvs commit: src/lib/libutil realhostname.c In-Reply-To: Message from Hajimu UMEMOTO of "Mon, 23 Jul 2001 14:42:23 PDT." <200107232142.f6NLgN454028@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 24 Jul 2001 01:05:07 +0100 From: Brian Somers Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > ume 2001/07/23 14:42:22 PDT > > Modified files: > lib/libutil realhostname.c > Log: > Simplify IPv4 mapped IPv6 address handling. > > Reviewed by: brian > MFC after: 5 days > > Revision Changes Path > 1.13 +40 -67 src/lib/libutil/realhostname.c It seems my problem with the original code (which inspired version 1.12 of realhostname.c (breaking IPv4 mapped addresses)) was due to a dumb mistake on my part. I had IPv4-only entries for the machines that were having problems in /etc/hosts. When getaddrinfo() is passed an AF_INET6 hint, it tries harder to find the AAAA records, and found them in my DNS (perhaps this is a little peculiar). The original code works fine (using AF_UNSPEC) once I fix /etc/hosts. My apologies to ume, and my thanks for his patience. -- Brian http://www.freebsd-services.com/ Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message