Summary: | getaddrinfo() hints==NULL (ai_flags) deviates from POSIX.1 | ||
---|---|---|---|
Product: | glibc | Reporter: | Michael Kerrisk <mtk.manpages> |
Component: | libc | Assignee: | Ulrich Drepper <drepper.fsp> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | glibc-bugs |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | 2.10 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Michael Kerrisk
2009-08-27 10:07:13 UTC
(In reply to comment #0) > Should it be fixed? No. Like several other things in the getaddrinfo spec this is non-optimal at best. The defaults used in glibc are much better. Subject: Re: getaddrinfo() hints==NULL (ai_flags) deviates from POSIX.1 On Mon, Aug 31, 2009 at 2:14 PM, drepper at redhat dot com<sourceware-bugzilla@sourceware.org> wrote: > > ------- Additional Comments From drepper at redhat dot com 2009-08-31 12:14 ------- > (In reply to comment #0) >> Should it be fixed? > > No. Like several other things in the getaddrinfo spec this is non-optimal at > best. The defaults used in glibc are much better. Thanks. I'll update the man page to make it clear that this choice is deliberate. Can some details be added as to why the glibc defaults are better than the POSIX standard. The default only applies if hints==NULL. If the POSIX defaults are non-optimal, then users of other systems (e.g. Solaris) would find it useful to know that different settings are preferred. On Solaris 10, setting hints to NULL results in POSIX defined behaviour. Are the reasons behind glibc's defaults unique to glibc or are they related to network effects which would apply to any OS or C resolver library. If the settings are valid everywhere then getaddrinfo() users would benefit from using them on non-glibc platforms. Thanks. |