From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56203 invoked by alias); 10 Jan 2016 09:09:32 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 56186 invoked by uid 89); 10 Jan 2016 09:09:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.6 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*MI:sk:loom.20, Hall, falling, H*MI:sk:5690039 X-HELO: plane.gmane.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 10 Jan 2016 09:09:29 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aIC05-0004ws-SR for cygwin@cygwin.com; Sun, 10 Jan 2016 10:09:26 +0100 Received: from S010690fba62c4bda.cg.shawcable.net ([96.51.88.197]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Jan 2016 10:09:25 +0100 Received: from Brian.Inglis by S010690fba62c4bda.cg.shawcable.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Jan 2016 10:09:25 +0100 To: cygwin@cygwin.com From: Brian Inglis Subject: Re: getaddrinfo fails with =?utf-8?b?RUFJX05PREFUQQ==?= for some valid hosts with A records Date: Sun, 10 Jan 2016 09:15:00 -0000 Message-ID: References: <20160108111408.GH20447@calimero.vinschen.de> <5690039E.6000704@gmail.com> <20160108185205.GL20447@calimero.vinschen.de> <004701d14a4f$b0182820$10487860$@comcast.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00096.txt.bz2 Andy Hall comcast.net> writes: >> On Jan 8 13:44, cyg Simple wrote: >>> On 1/8/2016 6:14 AM, Corinna Vinschen wrote: >>>> $ ./gai leapsecond.utcd.org >>>> ret = 11004 >>>> I have no idea why Windows' getaddrinfo chokes on leapsecond.utcd.org >>>> at all. >>> utcd.org doesn't resolve for me. So getaddrinfo has no info to get. >> Why then does it work on Linux? > nslookup works for me: > Win7 64-bit > $ nslookup leapsecond.utcd.org > Non-authoritative answer: > Server: UnKnown > Address: 192.168.1.1 > Name: leapsecond.utcd.org > Address: 244.34.36.97 > Win10 64-bit > C:\Users\Andy>nslookup leapsecond.utcd.org > Server: UnKnown > Address: 192.168.1.1 > Non-authoritative answer: > Name: leapsecond.utcd.org > Address: 244.34.36.97 > However, tracert and ping yield this on both W7 & W10: > $ tracert leapsecond.utcd.org > Unable to resolve target system name leapsecond.utcd.org. > $ tracert 244.34.36.97 > Tracing route to 244.34.36.97 over a maximum of 30 hops > 1 Transmit error: code 1231. > Trace complete. > $ ping 244.34.36.97 > Pinging 244.34.36.97 with 32 bytes of data: > PING: transmit failed. General failure. > PING: transmit failed. General failure. > PING: transmit failed. General failure. > PING: transmit failed. General failure. > Ping statistics for 244.34.36.97: > Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), > Weird! Everything works in my STC except Cygwin x86/x64 "getent ahosts leapsecond.utcd.org" on Windows 7 x64 which uses Cygwin getaddrinfo. Windows getaddrinfo (ASCII names) in Corinna's STC; Cygwin getaddrinfo, and Windows GetAddrInfoW (UCS2-LE names) used in the Cygwin implementations, fail in my code. Identical code works from Linux via the same router, and Corinna's MinGW STC indicates the problem is Windows code, not a BLODA, unless we define Windows as a likely BLODA. ;^> Worked around the problem by falling back to trying gethostbyname when gai returns 7 EAI_NODATA because GAIW returns 11004 WSANO_DATA. That error is normally reported when there are no A (and/or AAAA, depending on family and flags in the call) records for a domain name (most commonly only MX for mail server, possibly CNAME misspelled or with missing associated A/AAAA, or other DNS mis-configuration). Running whois utcd.org replies normally; whois, traceroute/tracert, and ping all fail on the name and address as there is host at that address. The domain, name, address, SOA, NS, A, and PTR records were set up by P-HK (phk.freebsd.dk) to provide leapsecond info from IERS Bulletin C encoded in an address in the IP V4 global class E experimental 240/8 space, see code at http://phk.freebsd.dk/time/20151122.html. An update is due next week for the end of June, when no change is expected, except the date updated to be valid until after then. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple