Phil Mayers <p.may...@imperial.ac.uk> wrote:
>
> This hostname is resolvable using "dig" & "host", but on Linux (glibc 2.20)
> the "ping", "telnet" and "nc" commands return "unknown host" or equivalent.

`ping` fails for me on FreeBSD but not MacOS.

> I suspect getaddrinfo isn't parsing the DNS response for some reason.

Well, sort of. The failure is because the resolver is doing name validity
checks along the chain of aliases, and an intermediate wildcard is not a
valid hostname.

For instance, have a look at
https://svnweb.freebsd.org/base/head/lib/libc/net/gethostbydns.c?view=markup#l140

Note the name_ok function pointer which is set to res_hnok for forward
queries, and res_hnok checks LDH syntax (plus underscores).

The old libbind code is similar, as is glibc.

Tony.
-- 
f.anthony.n.finch  <d...@dotat.at>  http://dotat.at/
Fair Isle, South Faeroes: Cyclonic 4 or 5, occasionally 6, becoming
northeasterly 5 to 7, increasing gale 8 for a time. Rough or very rough,
occasionally moderate. Rain or showers. Moderate or good.
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to