Ok, so the proper behavior is fr getaddrinfo() to continue resolution; I understand this. However, it's the order that it's probing the hosts that is the problem. It begins probing by appending a dot to the host, and looking up that. If it finds dns information for that host, it returns that information. /etc/hosts has no notion of fully-qualified domains; dots should be option. All it understands are aliases. The dot-appended host should not be looked for in /etc/hosts; or, if it is, then getaddrinfo() should continue processing w/ the non-dot-appended host, even if it finds a result for the dot-appended host via the resolver.
The bug isn't with how it probes for a host; the bug is with the host that it probes for. Probing for "foo.com." in /etc/hosts, when asked for "foo.com", is a bug. If this is how the new lookup model is supposed to work, then it should be properly documented. Currently, it's not. On Wed, Sep 18, 2002 at 12:36:51AM -0400, Ben Collins wrote: > [...] > > > > Basically, how is this not a bug? > > It is not a bug, because /etc/hosts is not broken, nor is it's usage. > The "problem" is that getaddrinfo is a new interface designed with new > goals. When getaddrinfo does a "lookup" it does not stop when it has > found the first match. Instead it keeps probing to find all info about a > particular host, which includes A, AAAA, and reverse for both. This is > how it is supposed to work. Just because this new mechanism does not fit > into an old model, does not mean it is broken. > > > -- > Debian - http://www.debian.org/ > Linux 1394 - http://www.linux1394.org/ > Subversion - http://subversion.tigris.org/ > Deqo - http://www.deqo.com/ -- Buying a Unix machine guarantees you a descent into Hell. It starts when you plug the computer in and it won't boot. Yes, they really did sell you a $10,000 computer with an unformatted disk drive. -- Philip Greenspun -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

