public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/10567] New: getaddrinfo() hints==NULL (ai_flags) deviates from POSIX.1
@ 2009-08-27 10:07 mtk dot manpages at gmail dot com
  2009-08-31 12:15 ` [Bug libc/10567] " drepper at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: mtk dot manpages at gmail dot com @ 2009-08-27 10:07 UTC (permalink / raw)
  To: glibc-bugs

POSIX.1-2001 and 2008 say that if the hints argument of getaddrinfo() is NULL, then 

       the behavior shall be as if it referred  to  a  structure
       containing  the value zero for the ai_flags, ai_socktype,
       and ai_protocol fields, and AF_UNSPEC for  the  ai_family
       field.

However, glibc defines ai_flags as AI_V4MAPPED | AI_ADDRCONFIG for this case. Is
this deviation from POSIX.1 intentional? Should it be fixed?

-- 
           Summary: getaddrinfo() hints==NULL (ai_flags) deviates from
                    POSIX.1
           Product: glibc
           Version: 2.10
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: mtk dot manpages at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10567

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libc/10567] getaddrinfo() hints==NULL (ai_flags) deviates from POSIX.1
  2009-08-27 10:07 [Bug libc/10567] New: getaddrinfo() hints==NULL (ai_flags) deviates from POSIX.1 mtk dot manpages at gmail dot com
@ 2009-08-31 12:15 ` drepper at redhat dot com
  2009-09-03  4:15 ` mtk dot manpages at googlemail dot com
  2009-10-09 22:08 ` pfee at talk21 dot com
  2 siblings, 0 replies; 5+ messages in thread
From: drepper at redhat dot com @ 2009-08-31 12:15 UTC (permalink / raw)
  To: glibc-bugs


------- 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.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


http://sourceware.org/bugzilla/show_bug.cgi?id=10567

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libc/10567] getaddrinfo() hints==NULL (ai_flags) deviates from POSIX.1
  2009-08-27 10:07 [Bug libc/10567] New: getaddrinfo() hints==NULL (ai_flags) deviates from POSIX.1 mtk dot manpages at gmail dot com
  2009-08-31 12:15 ` [Bug libc/10567] " drepper at redhat dot com
@ 2009-09-03  4:15 ` mtk dot manpages at googlemail dot com
  2009-10-09 22:08 ` pfee at talk21 dot com
  2 siblings, 0 replies; 5+ messages in thread
From: mtk dot manpages at googlemail dot com @ 2009-09-03  4:15 UTC (permalink / raw)
  To: glibc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 822 bytes --]


------- Additional Comments From mtk dot manpages at googlemail dot com  2009-09-03 04:15 -------
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.



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10567

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libc/10567] getaddrinfo() hints==NULL (ai_flags) deviates from POSIX.1
  2009-08-27 10:07 [Bug libc/10567] New: getaddrinfo() hints==NULL (ai_flags) deviates from POSIX.1 mtk dot manpages at gmail dot com
  2009-08-31 12:15 ` [Bug libc/10567] " drepper at redhat dot com
  2009-09-03  4:15 ` mtk dot manpages at googlemail dot com
@ 2009-10-09 22:08 ` pfee at talk21 dot com
  2 siblings, 0 replies; 5+ messages in thread
From: pfee at talk21 dot com @ 2009-10-09 22:08 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From pfee at talk21 dot com  2009-10-09 22:08 -------
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.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10567

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libc/10567] getaddrinfo() hints==NULL (ai_flags) deviates from POSIX.1
       [not found] <bug-10567-131@http.sourceware.org/bugzilla/>
@ 2014-07-01  6:56 ` fweimer at redhat dot com
  0 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2014-07-01  6:56 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=10567

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-07-01  6:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-27 10:07 [Bug libc/10567] New: getaddrinfo() hints==NULL (ai_flags) deviates from POSIX.1 mtk dot manpages at gmail dot com
2009-08-31 12:15 ` [Bug libc/10567] " drepper at redhat dot com
2009-09-03  4:15 ` mtk dot manpages at googlemail dot com
2009-10-09 22:08 ` pfee at talk21 dot com
     [not found] <bug-10567-131@http.sourceware.org/bugzilla/>
2014-07-01  6:56 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).