Resolution differences for getaddrinfo versus host/dig/delv
Mark Andrews
marka at isc.org
Wed Nov 18 21:12:26 UTC 2015
In message <564C6CED.6060403 at imperial.ac.uk>, Phil Mayers writes:
> All,
>
> This isn't strictly a "bind" question, but it kind-of, sort-of is.
>
> We've got an Office 365 tenancy, along with offsite voicemail. We send
> our SIP connections to a hostname:
>
> $GUID.um.outlook.com
>
> This hostname is resolvable using "dig" & "host", but on Linux (glibc
> 2.20) the "ping", "telnet" and "nc" commands return "unknown host" or
> equivalent.
>
> I suspect getaddrinfo isn't parsing the DNS response for some reason.
>
> Can anyone cast their eye over the response to the query below and guess
> why host/dig/delv think it's OK, but glibc getaddrinfo() apparently doesn't?
>
> $ dig blahblah.um.outlook.com
>
> ;; ANSWER SECTION:
> blahblah.um.outlook.com. 118 IN CNAME
> *.um.outlook.com.glbdns2.microsoft.com.
> *.um.outlook.com.glbdns2.microsoft.com. 60 IN CNAME
> wildcard-emeawest.um.outlook.com.
> wildcard-emeawest.um.outlook.com. 60 IN A 157.55.9.252
>
> (It's a wildcard, any left-hand-side will work)
>
> Obviously the *.thing on the RHS of the first CNAME is weird, but is it
> illegal?
As a hostname lookup, yes. RFC 952 + RFC 1123 define a valid hostname.
Even with IDN this is a illegal hostname.
As a record in the DNS, no. The DNS is a distributed database that
can contain lots of things.
dig, delve are designed to be general purpose DNS lookup tools.
host has a general lookup component to it though it is focused on hosnames.
getaddrinfo is strictly address lookups of hostnames. It applies the
stricter set of rules to the data returned.
> If you're of a sensitive disposition I'd avoid digging (pardon the pun)
> into the minutiae of the zone surrounding those records e.g. enclosing
> SOA - they're very seriously odd.
>
> Cheers,
> Phil
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe
> from this list
>
> bind-users mailing list
> bind-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: marka at isc.org
More information about the bind-users
mailing list