public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tore at fud dot no" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/12398] New: loopback addresses shouldn't be disregarded by getaddrinfo()+AI_ADDRCONFIG when looking up "localhost"
Date: Thu, 13 Jan 2011 20:03:00 -0000	[thread overview]
Message-ID: <bug-12398-131@http.sourceware.org/bugzilla/> (raw)

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

           Summary: loopback addresses shouldn't be disregarded by
                    getaddrinfo()+AI_ADDRCONFIG when looking up
                    "localhost"
           Product: glibc
           Version: 2.13
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: tore@fud.no


getaddrinfo() will disregard the loopback addresses ::1 and 127.0.0.1 when
attempting to figure out which address families are present on the host, when
being called with the AI_ADDRCONFIG flag.

This makes a lot of sense when looking up an external hostname.  However, it
makes very little sense when connecting to the hostname "localhost".  I've
learned that the browser vendors will avoid using AI_ADDRCONFIG or do it while
using workarounds for the localhost case, see for instance:

https://bugzilla.mozilla.org/show_bug.cgi?id=614526

Without such a workaround, connecting to a IPv4-only service listening on
127.0.0.1 using the hostname "localhost" will fail unless the machine also has
external IPv4 connectivity.  Which is not what a user would expect, since the
(lack of) external connectivity is irrelevant to the accessibility to the
loopback interface.

Therefore, when looking up "localhost", the loopback addresses ::1 and
127.0.0.1 should not be ignored by getaddrinfo() when using AI_ADDRCONFIG

Tore

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


             reply	other threads:[~2011-01-13 20:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 20:03 tore at fud dot no [this message]
2011-07-16  5:36 ` [Bug libc/12398] " nick.jones@network-box.com
2012-02-21  2:07 ` [Bug network/12398] " jsm28 at gcc dot gnu.org
2012-07-27 14:11 ` psimerda at redhat dot com
2012-07-28 10:13 ` psimerda at redhat dot com
2012-08-01 23:16 ` orion at cora dot nwra.com
2012-09-22 15:43 ` psimerda at redhat dot com
2012-11-20 23:13 ` [Bug network/12398] AI_ADDRCONFIG breaks getaddrinfo() calls for loopback names and addresses psimerda at redhat dot com
2012-11-20 23:33 ` psimerda at redhat dot com
2012-11-20 23:37 ` psimerda at redhat dot com
2012-11-20 23:39 ` psimerda at redhat dot com
2012-12-06  7:04 ` gaofeng at cn dot fujitsu.com
2012-12-16 13:47 ` tore at fud dot no
2012-12-16 15:53 ` [Bug network/12398] getaddrinfo("127.0.0.1") and/or getaddrinfo("::1) may fail with AI_ADDRCONFIG psimerda at redhat dot com
2012-12-17 17:30 ` psimerda at redhat dot com
2012-12-18 14:34 ` psimerda at redhat dot com
2013-02-09 17:54 ` phattanon at nettree dot co.th
2013-02-09 21:11 ` psimerda at redhat dot com
2013-02-24 22:12 ` psimerda at redhat dot com
2013-10-20 20:49 ` neleai at seznam dot cz
2013-10-22 10:04 ` psimerda at redhat dot com
2014-02-16 17:47 ` jackie.rosen at hushmail dot com
2014-05-28 19:45 ` schwab at sourceware dot org
2014-06-27 12:29 ` fweimer at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-12398-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).