This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/12398] New: loopback addresses shouldn't be disregarded by getaddrinfo()+AI_ADDRCONFIG when looking up "localhost"


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]