From owner-freebsd-questions@FreeBSD.ORG Wed Apr 23 17:24:52 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B084737B401 for ; Wed, 23 Apr 2003 17:24:52 -0700 (PDT) Received: from fed1mtao07.cox.net (fed1mtao07.cox.net [68.6.19.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D89C43F93 for ; Wed, 23 Apr 2003 17:24:50 -0700 (PDT) (envelope-from chive@gryphonmud.com) Received: from anoat.phoenix ([68.98.91.5]) by fed1mtao07.cox.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with SMTP id <20030424002447.CTVH11961.fed1mtao07.cox.net@anoat.phoenix> for ; Wed, 23 Apr 2003 20:24:47 -0400 Received: (qmail 8164 invoked by uid 1000); 24 Apr 2003 00:24:47 -0000 From: Nicolas Galler To: freebsd-questions@freebsd.org Date: Wed, 23 Apr 2003 17:24:45 -0700 User-Agent: KMail/1.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200304231724.47250.beanie@gryphonmud.com> Subject: getaddrinfo - lookup failure with PF_UNSPEC X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2003 00:24:53 -0000 It all started when konqueror refused to connect to www.hud.gov, saying there was no host by that name. That did sound a bit strange so I did nslookup www.hud.gov and it was there, then I did telnet www.hud.gov 80 and it was gone again. I found out that telnet -4 www.hud.gov 80 worked fine. Internet explorer (on win2k host behind the freebsd nat, using freebsd host as dns server) also works. So I wrote a little test, and it all boils down to this: getaddrinfo("www.hud.gov") works with hints.ai_family=PF_INET, and doesnt work with hints.ai_family=PF_UNSPEC. I also tried on a linux box (redhat 7.1, linux 2.4.2) on a completely different isp and had the same problem. Well except I couldn't test with 'telnet -4' because there is no '-4' switch on their telnet. A SunOS 5.7 (on another completely different isp), configured without IPv6, worked OK. I haven't found any host other than www.hud.gov exhibiting this behavior. There doesn't seem to be any AAAA record for it (well, www is a CNAME for www.content, which getaddrinfo doesn't see either, oddly enough it doesnt have any problem with fhadirect.hud.gov, the name returned by a reverse lookup). I am running FreeBSD 5.0-RELEASE. The kernel is configured with INET6 but I left all the inet6 to its default/automatic configuration. Lifting the firewall doesn't change the problem. Thanks for any help. Nick