Summary: | getaddrinfo returns three duplicate records per actual record | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Paul Forgey <paulf> |
Component: | [OLD] Library | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Paul Forgey
2004-06-13 23:26:43 UTC
Resolution from another hostname with multiple values was shown in the erroneous output. The expected output has the proper addresses for the hostname quoted in the sample code. However, the expected wrong results do indeed occur (66.94.230.36 66.94.230.36 66.94.230.36..) Sorry for any confusion. I can reproduce this bug on newer Debian machines now, indicating this is probably not a Gentoo specific bug. This bug should probably be forwarded to the glibc project. seems to happen in an uclibc environment also ... I don't think this is a bug at all. If you read the man page for getaddrinfo it says it will return one entry per host per protocol that can reach it. Try printing the socktype and protocol fields of the structs as well. Agreed. Furthermore, passing AF_INET/SOCK_STREAM (or SOCK_DGRAM) to the hints field properly filters it. ah, thanks guys for the feedback |