Bug 435563 - Should getaddrinfo()'s AI_ADDRCONFIG flag ignore loopback interfaces?
Summary: Should getaddrinfo()'s AI_ADDRCONFIG flag ignore loopback interfaces?
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-01 18:40 UTC by Sam Varshavchik
Modified: 2008-03-13 02:53 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-03-13 02:53:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Sam Varshavchik 2008-03-01 18:40:22 UTC
Description of problem:

On a host with IPV4-only interfaces, getaddrinfo() still returns AF_INET6
addresses even if the AI_ADDRCONFIG flag is specified.

Version-Release number of selected component (if applicable):

2.7

How reproducible:

always

Steps to Reproduce:

1. Invoke getaddrinfo() to look up a hostname with both AF_INET and AF_INET6
addresses, on a host that has only IPv4 connectivity.

Actual results:

getaddrinfo() will return both IPv6 and IPv4 addresses.

Expected results:

Only IPv4 addresses should be returned.

Additional info:

This is because in Fedora, the loopback interface is set up with the IPv6
loopback address ::1, in addition to 127.0.0.1. As such, getaddrinfo() thinks
that the host has IPv6 connectivity. Essentially, the AI_ADDRCONFIG flag is
always ignored.

Given the intent of the AI_ADDRCONFIG flag, getaddrinfo() should skip loopback
interfaces, when evaluating the AI_ADDRCONFIG flag.

Comment 1 Ulrich Drepper 2008-03-13 02:53:19 UTC
Loopback addresses are ignored for some time now.


Note You need to log in before you can comment on or make changes to this bug.