Andy Hall <fixpertise-consulting <at> 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