On Thu, 22 Apr 2004, Marc Aurele La France wrote: > On Tue, 20 Apr 2004, Peter Breitenlohner wrote: > > > 2. `getaddrinfo("host", NULL, NULL, &ai)' (as used by xdm) produced a 10sec > > timeout, whereas `getaddrinfo("host.domain", NULL, NULL, &ai)' as well as > > `gethostbyname("host")' give an immediate answer. > > > 2.1. the glibc-2.[23].x implementation of > > `getaddrinfo("host", NULL, NULL, &ai)' > > first queries the nameserver for "host.domain" and then for "host" (whereas > > `gethostbyname("host")' only queries for "host.domain"). I don't have the > > slightest idea what's the reason for this pecularity (feature or bug) of > > getaddrinfo since from the nameserver's point of view a domainname "host" > > without any dots doesn't make much sense.
> You seem to be implying that "host.domain" isn't resolvable, which doesn't make > much sense. That's not what I wanted to say. "host.domain" definitely is resolvable; its "host" that the nameserver cannot resolve. `getaddrinfo("host", NULL, NULL, &ai)' first queries the nameserver for "host.domain" and receives an almost instantaneous answer(*). Nevertheless it then queries the nameserver for "host" and depending on circumstances either gets an answer, presumably a negative one, or a timeout. It then queries again for "host.domain" (to get additional info or because the first answer was discarded ?) and finally returns the correct result. (*) up to this point `getaddrinfo("host", NULL, NULL, &ai)', `getaddrinfo("host.domain", NULL, NULL, &ai)', and `gethostbyname("host")' basically do the same (although I haven't decoded the DNS packets). Peter Breitenlohner <[EMAIL PROTECTED]> _______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel